<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>linux k8s在线｜离线部署 | 清峰小栈</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
  <meta name="keywords" content="k8s" />
  
  
  
  
  <meta name="description" content="适用于政务内网，完全无外网的情况 一、安装前须知  kubesphere官方文档: https:&#x2F;&#x2F;v3-1.docs.kubesphere.io&#x2F;zh&#x2F;docs&#x2F;  多节点安装文档: https:&#x2F;&#x2F;v3-1.docs.kubesphere.io&#x2F;zh&#x2F;docs&#x2F;installing-on-linux&#x2F;introduction&#x2F;multioverview&#x2F;  离线安装官方文档: https:&#x2F;&#x2F;">
<meta property="og:type" content="article">
<meta property="og:title" content="Linux k8s在线｜离线部署">
<meta property="og:url" content="http://example.com/2022/05/26/%E8%BF%90%E7%BB%B4%E5%AE%89%E8%A3%85/Linux%20k8s%E5%9C%A8%E7%BA%BF%EF%BD%9C%E7%A6%BB%E7%BA%BF%E9%83%A8%E7%BD%B2/index.html">
<meta property="og:site_name" content="清峰小栈">
<meta property="og:description" content="适用于政务内网，完全无外网的情况 一、安装前须知  kubesphere官方文档: https:&#x2F;&#x2F;v3-1.docs.kubesphere.io&#x2F;zh&#x2F;docs&#x2F;  多节点安装文档: https:&#x2F;&#x2F;v3-1.docs.kubesphere.io&#x2F;zh&#x2F;docs&#x2F;installing-on-linux&#x2F;introduction&#x2F;multioverview&#x2F;  离线安装官方文档: https:&#x2F;&#x2F;">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085605.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085620.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085629.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085636.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085725.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085734.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085743.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085752.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085810.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085818.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085825.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085831.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085837.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085847.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085855.png">
<meta property="og:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085904.png">
<meta property="article:published_time" content="2022-05-26T01:53:27.303Z">
<meta property="article:modified_time" content="2023-05-25T02:49:54.294Z">
<meta property="article:author" content="清峰">
<meta property="article:tag" content="k8s">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085605.png">
  

  

  <link rel="icon" href="/qingfeng-blog/css/images/mylogo-2.png">
  <link rel="apple-touch-icon" href="/qingfeng-blog/css/images/mylogo-2.png">
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link href="https://fonts.googleapis.com/css?family=Open+Sans|Montserrat:700" rel="stylesheet" type="text/css">
  <link href="https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic" rel="stylesheet" type="text/css">
  <!-- <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> -->
  <link href="/qingfeng-blog/css/font-awesome.css" rel="stylesheet">
  <style type="text/css">
    @font-face{font-family:futura-pt; src:url("/qingfeng-blog/css/fonts/FuturaPTBold.otf") format("woff");font-weight:500;font-style:normal;}
    @font-face{font-family:futura-pt-light; src:url("/qingfeng-blog/css/fonts/FuturaPTBook.otf") format("woff");font-weight:lighter;font-style:normal;}
    @font-face{font-family:futura-pt-italic; src:url("/qingfeng-blog/css/fonts/FuturaPTBookOblique.otf") format("woff");font-weight:400;font-style:italic;}
}

  </style>
  
<link rel="stylesheet" href="/qingfeng-blog/css/style.css">


  
<script src="/qingfeng-blog/js/jquery-3.1.1.min.js"></script>

  
<script src="/qingfeng-blog/js/bootstrap.js"></script>


  <!-- Bootstrap core CSS -->
  <link rel="stylesheet" href="/qingfeng-blog/css/bootstrap.css" >

  
    
<link rel="stylesheet" href="/qingfeng-blog/css/dialog.css">

  

  

  
    <link rel="stylesheet" href="/qingfeng-blog/css/header-post.css" >
  

  
  
  
    <link rel="stylesheet" href="/qingfeng-blog/css/vdonate.css" >
  

<meta name="generator" content="Hexo 6.3.0"></head>



  <body data-spy="scroll" data-target="#toc" data-offset="50">


  
  <div id="container">
    <div id="wrap">
      
        <header>

    <div id="allheader" class="navbar navbar-default navbar-static-top" role="navigation">
        <div class="navbar-inner">
          
          <div class="container"> 
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
              <span class="sr-only">Toggle navigation</span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>

            
              <a class="brand" style="
                 border-width: 0px;  margin-top: 0px;"  
                href="#" data-toggle="modal" data-target="#myModal" >
                  <img width="155px" height="90px" alt="Hike News" src="/qingfeng-blog/css/images/mylogo-2.png">
              </a>
            
            
            <div class="navbar-collapse collapse">
              <ul class="hnav navbar-nav">
                
                  <li> <a class="main-nav-link" href="/qingfeng-blog/">首页</a> </li>
                
                  <li> <a class="main-nav-link" href="/qingfeng-blog/categories">分类</a> </li>
                
                  <li> <a class="main-nav-link" href="/qingfeng-blog/tags">标签</a> </li>
                
                  <li><div id="search-form-wrap">

    <form class="search-form">
        <input type="text" class="ins-search-input search-form-input" placeholder="" />
        <button type="submit" class="search-form-submit"></button>
    </form>
    <div class="ins-search">
    <div class="ins-search-mask"></div>
    <div class="ins-search-container">
        <div class="ins-input-wrapper">
            <input type="text" class="ins-search-input" placeholder="Type something..." />
            <span class="ins-close ins-selectable"><i class="fa fa-times-circle"></i></span>
        </div>
        <div class="ins-section-wrapper">
            <div class="ins-section-container"></div>
        </div>
    </div>
</div>
<script>
(function (window) {
    var INSIGHT_CONFIG = {
        TRANSLATION: {
            POSTS: 'Posts',
            PAGES: 'Pages',
            CATEGORIES: 'Categories',
            TAGS: 'Tags',
            UNTITLED: '(Untitled)',
        },
        ROOT_URL: '/qingfeng-blog/',
        CONTENT_URL: '/qingfeng-blog/content.json',
    };
    window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>

<script src="/qingfeng-blog/js/insight.js"></script>


</div></li>
            </div>
          </div>
                
      </div>
    </div>

</header>



      
            
      <div id="content" class="outer">
        
          <section id="main" style="float:none;"><article id="post-运维安装/Linux k8s在线｜离线部署" style="width: 75%; float:left;" class="article article-type-post" itemscope itemprop="blogPost" >
<div id="container">
  <div id="articleInner" class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="thumb" class="article-title" itemprop="name">
      Linux k8s在线｜离线部署
    </h1>
  

      </header>
    
    <div class="article-meta">
      
	<a href="/qingfeng-blog/2022/05/26/%E8%BF%90%E7%BB%B4%E5%AE%89%E8%A3%85/Linux%20k8s%E5%9C%A8%E7%BA%BF%EF%BD%9C%E7%A6%BB%E7%BA%BF%E9%83%A8%E7%BD%B2/" class="article-date">
	  <time datetime="2022-05-26T01:53:27.303Z" itemprop="datePublished">2022-05-26</time>
	</a>

      
    <a class="article-category-link" href="/qingfeng-blog/categories/Docker/">Docker</a>

      
	<a class="article-views">
	<span id="busuanzi_container_page_pv">
		PV:<span id="busuanzi_value_page_pv"></span>
	</span>
	</a>

      

    </div>
    <div class="article-entry" itemprop="articleBody">
      
        <p>适用于政务内网，完全无外网的情况</p>
<h2 id="一、安装前须知"><a href="#一、安装前须知" class="headerlink" title="一、安装前须知"></a>一、安装前须知</h2><blockquote>
<p> kubesphere官方文档: <a target="_blank" rel="noopener" href="https://v3-1.docs.kubesphere.io/zh/docs/">https://v3-1.docs.kubesphere.io/zh/docs/</a></p>
<p> 多节点安装文档: <a target="_blank" rel="noopener" href="https://v3-1.docs.kubesphere.io/zh/docs/installing-on-linux/introduction/multioverview/">https://v3-1.docs.kubesphere.io/zh/docs/installing-on-linux/introduction/multioverview/</a></p>
<p> 离线安装官方文档: <a target="_blank" rel="noopener" href="https://v3-1.docs.kubesphere.io/zh/docs/installing-on-linux/introduction/air-gapped-installation/">https://v3-1.docs.kubesphere.io/zh/docs/installing-on-linux/introduction/air-gapped-installation/</a></p>
</blockquote>
<h3 id="前提环境"><a href="#前提环境" class="headerlink" title="前提环境"></a>前提环境</h3><p>安装顺序</p>
<ul>
<li><p>系统设置调整</p>
</li>
<li><p>docker</p>
</li>
<li><p>docker-compose</p>
</li>
<li><p>harbor （可选）</p>
</li>
<li><p>socat、conntrack、ebtables、ipset（k8s所需差件）</p>
</li>
<li><p>k8s和kubeshere</p>
</li>
<li><p>reids （可选）</p>
</li>
<li><p>mysql （可选）</p>
</li>
<li><p>java8、nacos、xxl-job （可选）</p>
</li>
<li><p>项目打包、上传私服 （可选）</p>
</li>
<li><p>启动相关 （可选）</p>
</li>
<li><p>elk集成 （可选）</p>
</li>
</ul>
<p><strong>在足够安全的外部防护下，可以永久关闭selinux</strong></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">setenforce 0</span><br><span class="line">sed -i <span class="string">&#x27;s/SELINUX=enforcing/SELINUX=disabled/&#x27;</span> /etc/selinux/config</span><br><span class="line">systemctl stop firewalld &amp;&amp; systemctl <span class="built_in">disable</span> firewalld</span><br><span class="line">swapoff -a</span><br><span class="line">sed -i <span class="string">&#x27;s/.*swap.*/#&amp;/&#x27;</span> /etc/fstab </span><br></pre></td></tr></table></figure>

<p><strong>一些必要的系统设置（建议调整）</strong></p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br></pre></td><td class="code"><pre><span class="line">cat &gt;&gt; /etc/sysctl.conf &lt;&lt;eof</span><br><span class="line">net.bridge.bridge-nf-call-ip6tables = 1</span><br><span class="line">net.bridge.bridge-nf-call-iptables = 1</span><br><span class="line">vm.max_map_count=262144</span><br><span class="line">vm.swappiness=0</span><br><span class="line">eof</span><br><span class="line"></span><br><span class="line">sysctl -p</span><br><span class="line"></span><br><span class="line">modprobe br_netfilter</span><br><span class="line"></span><br><span class="line">cat &gt;&gt; /etc/sysctl.conf &lt;&lt;eof</span><br><span class="line">net.bridge.bridge-nf-call-ip6tables = 1</span><br><span class="line">net.bridge.bridge-nf-call-iptables = 1</span><br><span class="line">vm.swappiness=0</span><br><span class="line">eof</span><br><span class="line"></span><br><span class="line">sysctl -p</span><br><span class="line"></span><br><span class="line">vim /etc/security/limits.conf</span><br><span class="line">* soft nofile 65536</span><br><span class="line">* hard nofile 65536</span><br><span class="line">* soft nproc 32000</span><br><span class="line">* hard nproc 32000</span><br><span class="line">* hard memlock unlimited</span><br><span class="line">* soft memlock unlimited</span><br><span class="line"></span><br><span class="line">vim /etc/systemd/system.conf</span><br><span class="line">DefaultLimitNOFILE=65536</span><br><span class="line">DefaultLimitNPROC=32000</span><br><span class="line">DefaultLimitMEMLOCK=infinity</span><br></pre></td></tr></table></figure>

<p><strong>指定主机名称</strong></p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">#命名指令：每个机器设置自己的名称，master为机器名称</span><br><span class="line">hostnamectl set-hostname master</span><br></pre></td></tr></table></figure>



<p>（可选）卸载之前的docker</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line">方法一： </span><br><span class="line">查询docker状态</span><br><span class="line">systemctl status docker</span><br><span class="line">停止docker状态</span><br><span class="line">systemctl stop docker</span><br><span class="line">卸载docker</span><br><span class="line">sudo yum remove docker \</span><br><span class="line">                  docker-client \</span><br><span class="line">                  docker-client-latest \</span><br><span class="line">                  docker-common \</span><br><span class="line">                  docker-latest \</span><br><span class="line">                  docker-latest-logrotate \</span><br><span class="line">                  docker-logrotate \</span><br><span class="line">                  docker-engine</span><br><span class="line">方法二： </span><br><span class="line">查询docker状态</span><br><span class="line">systemctl status docker</span><br><span class="line">查询docker安装过的包</span><br><span class="line">yum list installed | grep docker</span><br><span class="line">删除安装包</span><br><span class="line">yum remove docker-ce.x86_64 ddocker-ce-cli.x86_64 -y</span><br><span class="line">删除镜像/容器等</span><br><span class="line">rm -rf /var/lib/docker</span><br></pre></td></tr></table></figure>



<h2 id="二、在线安装Docker"><a href="#二、在线安装Docker" class="headerlink" title="二、在线安装Docker"></a>二、在线安装Docker</h2><h3 id="配置相关yum源"><a href="#配置相关yum源" class="headerlink" title="配置相关yum源"></a>配置相关yum源</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">sudo yum install -y yum-utils</span><br><span class="line">sudo yum-config-manager \</span><br><span class="line">--add-repo \</span><br><span class="line">http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo</span><br></pre></td></tr></table></figure>

<h3 id="安装docker"><a href="#安装docker" class="headerlink" title="安装docker"></a>安装docker</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">#以下是在安装k8s的时候使用</span><br><span class="line">yum install -y docker-ce-20.10.7 docker-ce-cli-20.10.7  containerd.io-1.4.6</span><br><span class="line">或</span><br><span class="line">#安装最新版docker</span><br><span class="line">sudo yum install -y docker-ce docker-ce-cli containerd.io</span><br></pre></td></tr></table></figure>

<h3 id="启动docker"><a href="#启动docker" class="headerlink" title="启动docker"></a>启动docker</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">systemctl enable docker --now</span><br></pre></td></tr></table></figure>

<h3 id="配置加速"><a href="#配置加速" class="headerlink" title="配置加速"></a>配置加速</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">#这里额外添加了docker的生产环境核心配置cgroup</span><br><span class="line">sudo mkdir -p /etc/docker</span><br><span class="line"></span><br><span class="line">sudo tee /etc/docker/daemon.json &lt;&lt;-&#x27;EOF&#x27;</span><br><span class="line">&#123;</span><br><span class="line">  &quot;registry-mirrors&quot;: [&quot;https://82m9ar63.mirror.aliyuncs.com&quot;],</span><br><span class="line">  &quot;exec-opts&quot;: [&quot;native.cgroupdriver=systemd&quot;],</span><br><span class="line">  &quot;log-driver&quot;: &quot;json-file&quot;,</span><br><span class="line">  &quot;log-opts&quot;: &#123;</span><br><span class="line">    &quot;max-size&quot;: &quot;100m&quot;</span><br><span class="line">  &#125;,</span><br><span class="line">  &quot;storage-driver&quot;: &quot;overlay2&quot;</span><br><span class="line">&#125;</span><br><span class="line">EOF</span><br><span class="line"></span><br><span class="line">sudo systemctl daemon-reload</span><br><span class="line"></span><br><span class="line">sudo systemctl restart docker</span><br></pre></td></tr></table></figure>

<h2 id="三、离线安装Docker"><a href="#三、离线安装Docker" class="headerlink" title="三、离线安装Docker"></a>三、离线安装Docker</h2><h3 id="下载安装包"><a href="#下载安装包" class="headerlink" title="下载安装包"></a>下载安装包</h3><ul>
<li>Docker版本必须大于<code>19.03.8+</code></li>
<li>Docker下载地址：<a target="_blank" rel="noopener" href="https://download.docker.com/linux/static/stable/x86_64/">https://download.docker.com/linux/static/stable/x86_64/</a></li>
</ul>
<blockquote>
<p>选择合适的docker版本</p>
<p>不同架构</p>
<p>下载地址：<a target="_blank" rel="noopener" href="https://download.docker.com/linux/static/stable/">https://download.docker.com/linux/static/stable/</a></p>
</blockquote>
<h3 id="解压缩"><a href="#解压缩" class="headerlink" title="解压缩"></a>解压缩</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">tar -zxvf docker-19.03.9.tgz</span><br></pre></td></tr></table></figure>

<h3 id="移动文件"><a href="#移动文件" class="headerlink" title="移动文件"></a>移动文件</h3><blockquote>
<p>解压的docker文件夹全部移动至&#x2F;usr&#x2F;bin目录</p>
</blockquote>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">cp docker/* /usr/bin/</span><br></pre></td></tr></table></figure>

<h3 id="将Docker注册为系统服务"><a href="#将Docker注册为系统服务" class="headerlink" title="将Docker注册为系统服务"></a>将Docker注册为系统服务</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">vi /etc/systemd/system/docker.service</span><br></pre></td></tr></table></figure>

<figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line">[Unit]</span><br><span class="line">Description=Docker Application Container Engine</span><br><span class="line">Documentation=https://docs.docker.com</span><br><span class="line">After=network-online.target firewalld.service</span><br><span class="line">Wants=network-online.target</span><br><span class="line">[Service]</span><br><span class="line">Type=notify</span><br><span class="line">ExecStart=/usr/bin/dockerd</span><br><span class="line">ExecReload=/bin/kill -s HUP <span class="variable">$MAINPID</span></span><br><span class="line">LimitNOFILE=infinity</span><br><span class="line">LimitNPROC=infinity</span><br><span class="line">LimitCORE=infinity</span><br><span class="line">TimeoutStartSec=0</span><br><span class="line">Delegate=<span class="built_in">yes</span></span><br><span class="line">KillMode=process</span><br><span class="line">Restart=on-failure</span><br><span class="line">StartLimitBurst=3</span><br><span class="line">StartLimitInterval=60s</span><br><span class="line">[Install]</span><br><span class="line">WantedBy=multi-user.target</span><br></pre></td></tr></table></figure>



<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">依次执行以下脚本</span></span><br><span class="line">chmod +x /etc/systemd/system/docker.service</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">刷新配置&amp;&amp;启动服务&amp;&amp;开启自启</span></span><br><span class="line">systemctl daemon-reload &amp;&amp; systemctl start docker &amp;&amp; systemctl enable docker.service</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">查看版本</span></span><br><span class="line">docker -v</span><br></pre></td></tr></table></figure>

<h3 id="配置dcker仓库路径"><a href="#配置dcker仓库路径" class="headerlink" title="配置dcker仓库路径"></a>配置dcker仓库路径</h3><p>vi &#x2F;etc&#x2F;docker&#x2F;daemon.json填入以下内容：（私仓IP改成自己的，也可事先预留装好harbor后再修改）</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">镜像加速（可不配）：registry-mirrors</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">仓库地址：insecure-registries</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">额外参数：exec-opts</span></span><br><span class="line">&#123;</span><br><span class="line">  &quot;registry-mirrors&quot;: [</span><br><span class="line">    &quot;https://sq9p56f6.mirror.aliyuncs.com&quot;</span><br><span class="line">  ],</span><br><span class="line">  &quot;insecure-registries&quot;: [&quot;私服ip:8088&quot;],</span><br><span class="line">  &quot;exec-opts&quot;:[&quot;native.cgroupdriver=systemd&quot;]</span><br><span class="line">&#125;</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">刷新配置&amp;&amp;启动服务&amp;&amp;开启自启</span></span><br><span class="line">systemctl daemon-reload &amp;&amp; systemctl restart docker</span><br></pre></td></tr></table></figure>



<h2 id="四、离线安装Docker-compose"><a href="#四、离线安装Docker-compose" class="headerlink" title="四、离线安装Docker-compose"></a>四、离线安装Docker-compose</h2><h3 id="下载安装包-1"><a href="#下载安装包-1" class="headerlink" title="下载安装包"></a>下载安装包</h3><p>Docker-Compose下载路径：<a target="_blank" rel="noopener" href="https://github.com/docker/compose/releases/download/1.24.1/docker-compose-Linux-x86_64">https://github.com/docker/compose/releases/download/1.24.1/docker-compose-Linux-x86_64</a></p>
<blockquote>
<p>选择合适的docker版本</p>
</blockquote>
<h3 id="配置"><a href="#配置" class="headerlink" title="配置"></a>配置</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#依次执行一下命令</span></span><br><span class="line"><span class="comment">#重命名</span></span><br><span class="line"><span class="built_in">mv</span> docker-compose-Linux-x86_64 docker-compose</span><br><span class="line">或有的是</span><br><span class="line"><span class="built_in">mv</span> docker-compose-Linux-x86_64.64 docker-compose</span><br><span class="line"><span class="comment">#修改权限</span></span><br><span class="line"><span class="built_in">chmod</span> +x docker-compose</span><br><span class="line"><span class="comment">#将docker-compose文件移动到了/usr/local/bin </span></span><br><span class="line"><span class="built_in">mv</span> docker-compose /usr/local/bin</span><br><span class="line"><span class="comment">#打开/etc/profile文件</span></span><br><span class="line">vi /etc/profile</span><br><span class="line"><span class="comment">#添加内容到文件末尾即可,然后保存退出</span></span><br><span class="line"><span class="comment">#export PATH=$JAVA_HOME:/usr/local/bin:$PATH</span></span><br><span class="line"><span class="comment">#重新加载配置文件,让其生效</span></span><br><span class="line"><span class="comment">#source /etc/profile</span></span><br><span class="line"><span class="comment">#测试</span></span><br><span class="line">docker-compose -version</span><br></pre></td></tr></table></figure>



<h2 id="五、安装harbor（在线｜离线）"><a href="#五、安装harbor（在线｜离线）" class="headerlink" title="五、安装harbor（在线｜离线）"></a>五、安装harbor（在线｜离线）</h2><h3 id="1、下载安装包拷贝到linux中"><a href="#1、下载安装包拷贝到linux中" class="headerlink" title="1、下载安装包拷贝到linux中"></a>1、下载安装包拷贝到linux中</h3><blockquote>
<p>在线安装包下载</p>
<p><a target="_blank" rel="noopener" href="https://mirror.rancher.cn/#harbor/">https://mirror.rancher.cn/#harbor/</a></p>
</blockquote>
<blockquote>
<p>离线安装包下载</p>
<p><a target="_blank" rel="noopener" href="https://github.com/goharbor/harbor/releases">https://github.com/goharbor/harbor/releases</a></p>
</blockquote>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"># 切换至/data/目录下</span><br><span class="line">cd /data/  </span><br><span class="line"># 创建目录harbor</span><br><span class="line">mkdir harbor </span><br><span class="line"># 将下载好的harbor-offline-installer-v1.10.1.tgz解压</span><br><span class="line">tar -xcvf harbor-offline-installer-v1.10.1.tgz</span><br><span class="line"># 切换至/data/目录下</span><br><span class="line">cd /data/  </span><br><span class="line"># 创建目录harbor</span><br><span class="line">mkdir harbor </span><br><span class="line"># 将下载好的harbor-online-installer-v1.10.10.tgz解压</span><br><span class="line">tar -zxvf harbor-online-installer-v1.10.10.tgz</span><br></pre></td></tr></table></figure>

<h3 id="2、修改配置文件"><a href="#2、修改配置文件" class="headerlink" title="2、修改配置文件"></a>2、修改配置文件</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">#有的harbor的配置文件叫harbor.yml.tmpl,可以复制一份改名</span><br><span class="line">cp harbor.yml.tmpl harbor.yml </span><br><span class="line">vi harbor.yml  </span><br></pre></td></tr></table></figure>



<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085605.png" alt="图片"></p>
<h3 id="3、执行安装脚本"><a href="#3、执行安装脚本" class="headerlink" title="3、执行安装脚本"></a>3、执行安装脚本</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">./install.sh  # 安装</span><br></pre></td></tr></table></figure>

<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085620.png" alt="图片"></p>
<h3 id="4、查看镜像"><a href="#4、查看镜像" class="headerlink" title="4、查看镜像"></a>4、查看镜像</h3><p>因为harbor本身自带docker 私有仓库，可以通过docker ps查看</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085629.png" alt="图片"></p>
<h3 id="5、访问harbor"><a href="#5、访问harbor" class="headerlink" title="5、访问harbor"></a>5、访问harbor</h3><p>ip+端口</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085636.png" alt="image-20220426140408316"></p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">扩展：</span><br><span class="line">在harbor目录中执行</span><br><span class="line">#启动harbor</span><br><span class="line">docker-compose start</span><br><span class="line">#停止harbor</span><br><span class="line">docker-compose stop</span><br></pre></td></tr></table></figure>



<blockquote>
<p>harbor修改端口：</p>
<p>1、停止harbor</p>
<p>docker-compose stop</p>
<p>2、修改配置文件harbor.yml </p>
<p>prot：端口号</p>
<p>3、重启安装脚本</p>
<p>.&#x2F;install.sh</p>
</blockquote>
<h2 id="六、Kubesphere及k8s安装"><a href="#六、Kubesphere及k8s安装" class="headerlink" title="六、Kubesphere及k8s安装"></a>六、Kubesphere及k8s安装</h2><h3 id="在线安装"><a href="#在线安装" class="headerlink" title="在线安装"></a>在线安装</h3><p><a target="_blank" rel="noopener" href="https://kubesphere.com.cn/">https://kubesphere.com.cn/</a></p>
<p><strong>适用于能访问互联网的环境</strong></p>
<p><strong>温馨提示</strong></p>
<blockquote>
<ul>
<li><p>自行安装docker。在未安装docker时，kk会自动安装docker，但建议docker自行安装，并且进行相应配置的设置。</p>
</li>
<li><p>在机器硬盘不够大时，建议挂载外部存储。docker默认挂载目录是&#x2F;var&#x2F;lib&#x2F;docker，绝大多数下本机硬盘不可能有这么大，必须要将docker容器的存储挂载到外置存储上去。</p>
</li>
<li><p>设置好镜像私服。由于后续拉各类包都要依赖私仓，如果现在不设置，在k8s安装完成后发现无法拉镜像，这时再去改daemon.json需要重启docker，这是一个比较危险的行为。</p>
</li>
<li><p>在安装前可以先启用部分插件，但是尽量在安装后再去启用，以免超过k8安装的超时时间（简单来说就是config-sample.yaml中的参数，除了私仓、机器配置，其他的一概不要动）</p>
</li>
<li><p>安装完成后会提示访问地址是多少，按照控制台提示去登录即可，账号密码都在控制台上，安装过程大概要20分钟左右</p>
</li>
<li><p>K8S集群的关闭是比较危险的行为，存在掉电风险的客户现场，不是很建议使用本方案，虽然掉电后无法启动集群是小概率事件，但是一旦出现就要卸载集群重装，虽然只是一句命令的事，但是会有几十分钟的空窗时间。如果一定要部署，请一定要有备用的逻辑部署方案可以随时切换。</p>
</li>
</ul>
</blockquote>
<h4 id="1、下载安装脚本"><a href="#1、下载安装脚本" class="headerlink" title="1、下载安装脚本"></a>1、下载安装脚本</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#找一个合适的目录</span></span><br><span class="line"><span class="built_in">export</span> KKZONE=cn;</span><br><span class="line">curl -sfL https://get-kk.kubesphere.io | VERSION=v1.1.1 sh -</span><br><span class="line"><span class="built_in">chmod</span> +x kk</span><br><span class="line">./kk create config --with-kubernetes v1.20.4 --with-kubesphere v3.1.1 -f config-sample.yaml</span><br><span class="line"><span class="comment">#编辑yaml</span></span><br><span class="line">vim config-sample.yaml</span><br><span class="line"></span><br><span class="line"><span class="comment">#添加私服地址 registry.insecureRegistries</span></span><br><span class="line"><span class="comment">#指定要纳入集群的机器 spec.hosts</span></span><br><span class="line"><span class="comment">#指定主节点 spec.roleGroups.etcd spec.roleGroups.master</span></span><br><span class="line"><span class="comment">#指定工作节点 spec.roleGroups.worker </span></span><br><span class="line"></span><br><span class="line"><span class="comment">#执行</span></span><br><span class="line">./kk create cluster -f config-sample.yaml</span><br></pre></td></tr></table></figure>

<h4 id="2、安装失败回滚"><a href="#2、安装失败回滚" class="headerlink" title="2、安装失败回滚"></a>2、安装失败回滚</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">如果安装过程出现意外需要回滚，执行以下代码后可以重新安装：</span><br><span class="line">./kk delete cluster -f config-sample.yaml</span><br><span class="line">modprobe -r ipip</span><br><span class="line">lsmod</span><br><span class="line">rm -rf ~/.kube/</span><br><span class="line">rm -rf /etc/kubernetes/</span><br><span class="line">rm -rf /etc/systemd/system/kubelet.service.d</span><br><span class="line">rm -rf /etc/systemd/system/kubelet.service</span><br><span class="line">rm -rf /usr/bin/kube*</span><br><span class="line">rm -rf /etc/cni</span><br><span class="line">rm -rf /opt/cni</span><br><span class="line">rm -rf /var/lib/etcd</span><br><span class="line">rm -rf /var/etcd</span><br></pre></td></tr></table></figure>

<p><strong>扩展</strong></p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">#查看pod创建进度</span><br><span class="line">kubectl get pods -A</span><br><span class="line">#查看pod描述</span><br><span class="line">kubectl describe pods/pod名称 -n 命名空间</span><br></pre></td></tr></table></figure>



<h3 id="离线安装"><a href="#离线安装" class="headerlink" title="离线安装"></a>离线安装</h3><p><strong>适用于无法访问互联网的环境</strong></p>
<blockquote>
<p>您可以根据自己的需求变更下载的 Kubernetes 版本。安装 KubeSphere v3.1.1 的建议 Kubernetes 版本：v1.17.9，v1.18.8，v1.19.8 以及 v1.20.4。如果不指定 Kubernetes 版本，KubeKey 将默认安装 Kubernetes v1.19.8。有关受支持的 Kubernetes 版本的更多信息，请参见<a target="_blank" rel="noopener" href="https://v3-1.docs.kubesphere.io/zh/docs/installing-on-linux/introduction/kubekey/#%E6%94%AF%E6%8C%81%E7%9F%A9%E9%98%B5">支持矩阵</a>。</p>
<p>运行脚本后，会自动创建一个文件夹 <code>kubekey</code>。请注意，您稍后创建集群时，该文件和 <code>kk</code> 必须放在同一个目录下。</p>
<p>参考：<br>#下载镜像清单：<br>curl -L -O <a target="_blank" rel="noopener" href="https://github.com/kubesphere/ks-installer/releases/download/v3.1.1/images-list.txt">https://github.com/kubesphere/ks-installer/releases/download/v3.1.1/images-list.txt</a><br>#下载 offline-installation-tool.sh<br>curl -L -O <a target="_blank" rel="noopener" href="https://github.com/kubesphere/ks-installer/releases/download/v3.1.1/offline-installation-tool.sh">https://github.com/kubesphere/ks-installer/releases/download/v3.1.1/offline-installation-tool.sh</a></p>
</blockquote>
<h4 id="1、安装k8s插件"><a href="#1、安装k8s插件" class="headerlink" title="1、安装k8s插件"></a>1、安装k8s插件</h4><p>离线下载好安装k8s的插件包（socat、conntrack、ebtables、ipset）（提供的包内有k8s-plugins）</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">如有zip文件，解压命令：</span><br><span class="line">unzip -o k8s.zip</span><br><span class="line">没有unzip命令需要下载离线插件（提供的包内有unzip）</span><br><span class="line">1）unzip和zip包下载地址：</span><br><span class="line">http://www.rpmfind.net/linux/rpm2html/search.php</span><br><span class="line">2）输入zip和centos搜索，选择el7下载</span><br><span class="line">3）输入unzip和centos搜索，选择el7下载</span><br><span class="line"></span><br><span class="line">安装rpm的执行命令：</span><br><span class="line">rpm -Uvh *.rpm --nodeps --force;</span><br></pre></td></tr></table></figure>

<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">服务器登录harbor,获取认证</span><br><span class="line">docker login ip+port -u admin</span><br></pre></td></tr></table></figure>

<h4 id="2、安装k8s"><a href="#2、安装k8s" class="headerlink" title="2、安装k8s"></a>2、安装k8s</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#文件可执行。</span></span><br><span class="line"><span class="built_in">chmod</span> +x offline-installation-tool.sh</span><br><span class="line"><span class="built_in">export</span> KKZONE=cn;</span><br><span class="line">./offline-installation-tool.sh -b -v v1.20.4 </span><br><span class="line"><span class="comment">#推送镜像文件到仓库 IP:8088改成私服仓库的ip+端口（8G等待30分钟左右，几分钟就推完了可能是网络中断，需要再次推送）</span></span><br><span class="line">./offline-installation-tool.sh -l images-list.txt -d ./kubesphere-images -r 私服ip:8088/library</span><br><span class="line"><span class="comment">#解压进入目录：</span></span><br><span class="line"><span class="built_in">chmod</span> +x kk</span><br><span class="line"><span class="comment">#指定对应版本</span></span><br><span class="line">./kk create config --with-kubernetes v1.20.6 --with-kubesphere v3.1.1 -f config-sample.yaml</span><br><span class="line"></span><br><span class="line"><span class="comment">#编辑，yaml文件放在后（提前将每台服务器命名）</span></span><br><span class="line">vim config-sample.yaml</span><br><span class="line"><span class="comment">#指定要纳入集群的机器 spec.hosts</span></span><br><span class="line"><span class="comment">#指定主节点 spec.roleGroups.etcd spec.roleGroups.master</span></span><br><span class="line"><span class="comment">#指定工作节点 spec.roleGroups.worker </span></span><br><span class="line"><span class="comment">#添加私服地址：镜像仓库ip和端口（私服ip:端口改成自己的）</span></span><br><span class="line">registry:</span><br><span class="line">    registryMirrors: []</span><br><span class="line">    insecureRegistries: [私服ip:端口]</span><br><span class="line">    privateRegistry: 私服ip:端口/library</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">#执行安装k8s（出现每个节点镜像下载不到错误是镜像没推送上去，需要再次推送｜镜像版本找不到看推送的是哪一版的config-sample.yaml配置又是哪一版的）</span></span><br><span class="line">./kk create cluster -f config-sample.yaml</span><br></pre></td></tr></table></figure>

<h4 id="3、安装失败回滚"><a href="#3、安装失败回滚" class="headerlink" title="3、安装失败回滚"></a>3、安装失败回滚</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">如果安装过程出现意外需要回滚，执行以下代码后可以重新安装：</span><br><span class="line">./kk delete cluster -f config-sample.yaml</span><br><span class="line"></span><br><span class="line">modprobe -r ipip</span><br><span class="line">lsmod</span><br><span class="line">rm -rf ~/.kube/</span><br><span class="line">rm -rf /etc/kubernetes/</span><br><span class="line">rm -rf /etc/systemd/system/kubelet.service.d</span><br><span class="line">rm -rf /etc/systemd/system/kubelet.service</span><br><span class="line">rm -rf /usr/bin/kube*</span><br><span class="line">rm -rf /etc/cni</span><br><span class="line">rm -rf /opt/cni</span><br><span class="line">rm -rf /var/lib/etcd</span><br><span class="line">rm -rf /var/etcd</span><br></pre></td></tr></table></figure>

<p>参考：config-sample.yaml</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">apiVersion:</span> <span class="string">kubekey.kubesphere.io/v1alpha1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Cluster</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">sample</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">hosts:</span></span><br><span class="line">  <span class="bullet">-</span> &#123;<span class="attr">name:</span> <span class="string">master14</span>, <span class="attr">address:</span> <span class="number">192.168</span><span class="number">.239</span><span class="number">.14</span>, <span class="attr">internalAddress:</span> <span class="number">192.168</span><span class="number">.239</span><span class="number">.14</span>, <span class="attr">port:</span> <span class="number">22</span>, <span class="attr">user:</span> <span class="string">root</span>, <span class="attr">password:</span> <span class="number">123456</span>&#125;</span><br><span class="line">  <span class="bullet">-</span> &#123;<span class="attr">name:</span> <span class="string">node22</span>, <span class="attr">address:</span> <span class="number">192.168</span><span class="number">.239</span><span class="number">.22</span>, <span class="attr">internalAddress:</span> <span class="number">192.168</span><span class="number">.239</span><span class="number">.22</span>, <span class="attr">port:</span> <span class="number">22</span>, <span class="attr">user:</span> <span class="string">root</span>, <span class="attr">password:</span> <span class="number">123456</span>&#125;</span><br><span class="line">  <span class="bullet">-</span> &#123;<span class="attr">name:</span> <span class="string">node23</span>, <span class="attr">address:</span> <span class="number">192.168</span><span class="number">.239</span><span class="number">.23</span>, <span class="attr">internalAddress:</span> <span class="number">192.168</span><span class="number">.239</span><span class="number">.23</span>, <span class="attr">port:</span> <span class="number">22</span>, <span class="attr">user:</span> <span class="string">root</span>, <span class="attr">password:</span> <span class="number">123456</span>&#125;</span><br><span class="line">  <span class="attr">roleGroups:</span></span><br><span class="line">    <span class="attr">etcd:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">master14</span></span><br><span class="line">    <span class="attr">master:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">master14</span></span><br><span class="line">    <span class="attr">worker:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">node22</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">node23</span></span><br><span class="line">  <span class="attr">controlPlaneEndpoint:</span></span><br><span class="line">    <span class="attr">domain:</span> <span class="string">lb.kubesphere.local</span></span><br><span class="line">    <span class="attr">address:</span> <span class="string">&quot;&quot;</span></span><br><span class="line">    <span class="attr">port:</span> <span class="number">6443</span></span><br><span class="line">  <span class="attr">kubernetes:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1.19.8</span></span><br><span class="line">    <span class="attr">imageRepo:</span> <span class="string">kubesphere</span></span><br><span class="line">    <span class="attr">clusterName:</span> <span class="string">cluster.local</span></span><br><span class="line">  <span class="attr">network:</span></span><br><span class="line">    <span class="attr">plugin:</span> <span class="string">calico</span></span><br><span class="line">    <span class="attr">kubePodsCIDR:</span> <span class="number">10.233</span><span class="number">.64</span><span class="number">.0</span><span class="string">/18</span></span><br><span class="line">    <span class="attr">kubeServiceCIDR:</span> <span class="number">10.233</span><span class="number">.0</span><span class="number">.0</span><span class="string">/18</span></span><br><span class="line">  <span class="attr">registry:</span></span><br><span class="line">    <span class="attr">registryMirrors:</span> []</span><br><span class="line">    <span class="attr">insecureRegistries:</span> [<span class="string">&quot;192.168.239.24:8088&quot;</span>]</span><br><span class="line">    <span class="attr">privateRegistry:</span> <span class="number">192.168</span><span class="number">.239</span><span class="number">.24</span><span class="string">:8088/library</span></span><br><span class="line">  <span class="attr">addons:</span> []</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">installer.kubesphere.io/v1alpha1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">ClusterConfiguration</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">ks-installer</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">kubesphere-system</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v3.1.1</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">persistence:</span></span><br><span class="line">    <span class="attr">storageClass:</span> <span class="string">&quot;&quot;</span>       </span><br><span class="line">  <span class="attr">authentication:</span></span><br><span class="line">    <span class="attr">jwtSecret:</span> <span class="string">&quot;&quot;</span></span><br><span class="line">  <span class="attr">zone:</span> <span class="string">&quot;&quot;</span></span><br><span class="line">  <span class="attr">local_registry:</span> <span class="string">&quot;&quot;</span>        </span><br><span class="line">  <span class="attr">etcd:</span></span><br><span class="line">    <span class="attr">monitoring:</span> <span class="literal">false</span>      </span><br><span class="line">    <span class="attr">endpointIps:</span> <span class="string">localhost</span>  </span><br><span class="line">    <span class="attr">port:</span> <span class="number">2379</span>             </span><br><span class="line">    <span class="attr">tlsEnable:</span> <span class="literal">true</span></span><br><span class="line">  <span class="attr">common:</span></span><br><span class="line">    <span class="attr">redis:</span></span><br><span class="line">      <span class="attr">enabled:</span> <span class="literal">false</span></span><br><span class="line">    <span class="attr">redisVolumSize:</span> <span class="string">2Gi</span> </span><br><span class="line">    <span class="attr">openldap:</span></span><br><span class="line">      <span class="attr">enabled:</span> <span class="literal">false</span></span><br><span class="line">    <span class="attr">openldapVolumeSize:</span> <span class="string">2Gi</span>  </span><br><span class="line">    <span class="attr">minioVolumeSize:</span> <span class="string">20Gi</span></span><br><span class="line">    <span class="attr">monitoring:</span></span><br><span class="line">      <span class="attr">endpoint:</span> <span class="string">http://prometheus-operated.kubesphere-monitoring-system.svc:9090</span></span><br><span class="line">    <span class="attr">es:</span>  </span><br><span class="line">      <span class="attr">elasticsearchMasterVolumeSize:</span> <span class="string">4Gi</span>   </span><br><span class="line">      <span class="attr">elasticsearchDataVolumeSize:</span> <span class="string">20Gi</span>   </span><br><span class="line">      <span class="attr">logMaxAge:</span> <span class="number">7</span>          </span><br><span class="line">      <span class="attr">elkPrefix:</span> <span class="string">logstash</span></span><br><span class="line">      <span class="attr">basicAuth:</span></span><br><span class="line">        <span class="attr">enabled:</span> <span class="literal">false</span></span><br><span class="line">        <span class="attr">username:</span> <span class="string">&quot;&quot;</span></span><br><span class="line">        <span class="attr">password:</span> <span class="string">&quot;&quot;</span></span><br><span class="line">      <span class="attr">externalElasticsearchUrl:</span> <span class="string">&quot;&quot;</span></span><br><span class="line">      <span class="attr">externalElasticsearchPort:</span> <span class="string">&quot;&quot;</span>  </span><br><span class="line">  <span class="attr">console:</span></span><br><span class="line">    <span class="attr">enableMultiLogin:</span> <span class="literal">true</span> </span><br><span class="line">    <span class="attr">port:</span> <span class="number">30880</span></span><br><span class="line">  <span class="attr">alerting:</span>       </span><br><span class="line">    <span class="attr">enabled:</span> <span class="literal">false</span></span><br><span class="line">    <span class="comment"># thanosruler:</span></span><br><span class="line">    <span class="comment">#   replicas: 1</span></span><br><span class="line">    <span class="comment">#   resources: &#123;&#125;</span></span><br><span class="line">  <span class="attr">auditing:</span>    </span><br><span class="line">    <span class="attr">enabled:</span> <span class="literal">false</span></span><br><span class="line">  <span class="attr">devops:</span>           </span><br><span class="line">    <span class="attr">enabled:</span> <span class="literal">true</span></span><br><span class="line">    <span class="attr">jenkinsMemoryLim:</span> <span class="string">2Gi</span>     </span><br><span class="line">    <span class="attr">jenkinsMemoryReq:</span> <span class="string">1500Mi</span> </span><br><span class="line">    <span class="attr">jenkinsVolumeSize:</span> <span class="string">8Gi</span>   </span><br><span class="line">    <span class="attr">jenkinsJavaOpts_Xms:</span> <span class="string">512m</span>  </span><br><span class="line">    <span class="attr">jenkinsJavaOpts_Xmx:</span> <span class="string">512m</span></span><br><span class="line">    <span class="attr">jenkinsJavaOpts_MaxRAM:</span> <span class="string">2g</span></span><br><span class="line">  <span class="attr">events:</span>          </span><br><span class="line">    <span class="attr">enabled:</span> <span class="literal">false</span></span><br><span class="line">    <span class="attr">ruler:</span></span><br><span class="line">      <span class="attr">enabled:</span> <span class="literal">true</span></span><br><span class="line">      <span class="attr">replicas:</span> <span class="number">2</span></span><br><span class="line">  <span class="attr">logging:</span>         </span><br><span class="line">    <span class="attr">enabled:</span> <span class="literal">false</span></span><br><span class="line">    <span class="attr">logsidecar:</span></span><br><span class="line">      <span class="attr">enabled:</span> <span class="literal">true</span></span><br><span class="line">      <span class="attr">replicas:</span> <span class="number">2</span></span><br><span class="line">  <span class="attr">metrics_server:</span>             </span><br><span class="line">    <span class="attr">enabled:</span> <span class="literal">false</span></span><br><span class="line">  <span class="attr">monitoring:</span></span><br><span class="line">    <span class="attr">storageClass:</span> <span class="string">&quot;&quot;</span></span><br><span class="line">    <span class="attr">prometheusMemoryRequest:</span> <span class="string">400Mi</span>  </span><br><span class="line">    <span class="attr">prometheusVolumeSize:</span> <span class="string">20Gi</span>  </span><br><span class="line">  <span class="attr">multicluster:</span></span><br><span class="line">    <span class="attr">clusterRole:</span> <span class="string">none</span> </span><br><span class="line">  <span class="attr">network:</span></span><br><span class="line">    <span class="attr">networkpolicy:</span></span><br><span class="line">      <span class="attr">enabled:</span> <span class="literal">false</span></span><br><span class="line">    <span class="attr">ippool:</span></span><br><span class="line">      <span class="attr">type:</span> <span class="string">none</span></span><br><span class="line">    <span class="attr">topology:</span></span><br><span class="line">      <span class="attr">type:</span> <span class="string">none</span></span><br><span class="line">  <span class="attr">openpitrix:</span></span><br><span class="line">    <span class="attr">store:</span></span><br><span class="line">      <span class="attr">enabled:</span> <span class="literal">false</span></span><br><span class="line">  <span class="attr">servicemesh:</span>    </span><br><span class="line">    <span class="attr">enabled:</span> <span class="literal">false</span>  </span><br><span class="line">  <span class="attr">kubeedge:</span></span><br><span class="line">    <span class="attr">enabled:</span> <span class="literal">false</span></span><br><span class="line">    <span class="attr">cloudCore:</span></span><br><span class="line">      <span class="attr">nodeSelector:</span> &#123;<span class="attr">&quot;node-role.kubernetes.io/worker&quot;:</span> <span class="string">&quot;&quot;</span>&#125;</span><br><span class="line">      <span class="attr">tolerations:</span> []</span><br><span class="line">      <span class="attr">cloudhubPort:</span> <span class="string">&quot;10000&quot;</span></span><br><span class="line">      <span class="attr">cloudhubQuicPort:</span> <span class="string">&quot;10001&quot;</span></span><br><span class="line">      <span class="attr">cloudhubHttpsPort:</span> <span class="string">&quot;10002&quot;</span></span><br><span class="line">      <span class="attr">cloudstreamPort:</span> <span class="string">&quot;10003&quot;</span></span><br><span class="line">      <span class="attr">tunnelPort:</span> <span class="string">&quot;10004&quot;</span></span><br><span class="line">      <span class="attr">cloudHub:</span></span><br><span class="line">        <span class="attr">advertiseAddress:</span> </span><br><span class="line">          <span class="bullet">-</span> <span class="string">&quot;&quot;</span>           </span><br><span class="line">        <span class="attr">nodeLimit:</span> <span class="string">&quot;100&quot;</span></span><br><span class="line">      <span class="attr">service:</span></span><br><span class="line">        <span class="attr">cloudhubNodePort:</span> <span class="string">&quot;30000&quot;</span></span><br><span class="line">        <span class="attr">cloudhubQuicNodePort:</span> <span class="string">&quot;30001&quot;</span></span><br><span class="line">        <span class="attr">cloudhubHttpsNodePort:</span> <span class="string">&quot;30002&quot;</span></span><br><span class="line">        <span class="attr">cloudstreamNodePort:</span> <span class="string">&quot;30003&quot;</span></span><br><span class="line">        <span class="attr">tunnelNodePort:</span> <span class="string">&quot;30004&quot;</span></span><br><span class="line">    <span class="attr">edgeWatcher:</span></span><br><span class="line">      <span class="attr">nodeSelector:</span> &#123;<span class="attr">&quot;node-role.kubernetes.io/worker&quot;:</span> <span class="string">&quot;&quot;</span>&#125;</span><br><span class="line">      <span class="attr">tolerations:</span> []</span><br><span class="line">      <span class="attr">edgeWatcherAgent:</span></span><br><span class="line">        <span class="attr">nodeSelector:</span> &#123;<span class="attr">&quot;node-role.kubernetes.io/worker&quot;:</span> <span class="string">&quot;&quot;</span>&#125;</span><br><span class="line">        <span class="attr">tolerations:</span> []</span><br></pre></td></tr></table></figure>



<h2 id="七、离线安装中间件与项目"><a href="#七、离线安装中间件与项目" class="headerlink" title="七、离线安装中间件与项目"></a>七、离线安装中间件与项目</h2><h3 id="1、sql文件导入"><a href="#1、sql文件导入" class="headerlink" title="1、sql文件导入"></a>1、sql文件导入</h3><p>将mysql、nacos、xxl-job所需的sql文件导入数据库</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">创建数据库</span></span><br><span class="line">CREATE DATABASE IF NOT EXISTS 库名 DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE   utf8mb4_general_ci;</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">使用指定库</span></span><br><span class="line">use 库名</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">导入sql文件</span></span><br><span class="line">source sql文件路径</span><br></pre></td></tr></table></figure>

<h3 id="2、java8、nacos、xxl-job、pdf镜像打包"><a href="#2、java8、nacos、xxl-job、pdf镜像打包" class="headerlink" title="2、java8、nacos、xxl-job、pdf镜像打包"></a>2、java8、nacos、xxl-job、pdf镜像打包</h3><blockquote>
<p>离线环境没有这些镜像需要自己去下</p>
<p>思路：</p>
<p>1）到公司私仓下载镜像，在将镜像打包导出到本地</p>
<p>2）将打包好的镜像导入到政务云服务器docker中</p>
<p>3）将政务云服务器docker中的镜像上传至政务云harbor中</p>
</blockquote>
<figure class="highlight docker"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#公司私仓下载镜像</span></span><br><span class="line">docker pull <span class="number">192.168</span>.x.x:<span class="number">8080</span>/common/nacos-server:<span class="number">2.0</span>.<span class="number">2</span></span><br><span class="line">docker pull <span class="number">192.168</span>.x.x:<span class="number">8080</span>/common/pdfjdk:latest</span><br><span class="line">docker pull <span class="number">192.168</span>.x.x:<span class="number">8080</span>/common/xxl-job-admin:latest</span><br><span class="line"><span class="comment">#公网下</span></span><br><span class="line">docker pull java:<span class="number">8</span></span><br><span class="line"></span><br><span class="line"><span class="comment">#文件会保存到当前的 docker终端目录（当前文件夹下）</span></span><br><span class="line"><span class="comment">#1）导出镜像（推荐用容器名而不用id）</span></span><br><span class="line">docker tag nacos-server:<span class="number">2.0</span>.<span class="number">2</span> <span class="number">192.168</span>.x.x:<span class="number">8080</span>/common/nacos-server:<span class="number">2.0</span>.<span class="number">2</span></span><br><span class="line">docker save <span class="number">192.168</span>.x.x:<span class="number">8080</span>/common/nacos-server:<span class="number">2.0</span>.<span class="number">2</span> &gt; nacos-server:<span class="number">2.0</span>.<span class="number">2</span>.tar</span><br><span class="line"><span class="comment">#2）导入镜像</span></span><br><span class="line">docker load &lt; nacos-server:<span class="number">2.0</span>.<span class="number">2</span>.tar</span><br><span class="line"></span><br><span class="line"><span class="comment">#推送（1、改成仓库地址+仓库名+镜像名+版本号 2、推送）</span></span><br><span class="line">docker tag SOURCE_IMAGE[:TAG] <span class="number">192.168</span>.x.x:<span class="number">8080</span>/trade-dev2/IMAGE[:TAG]</span><br><span class="line">docker push <span class="number">192.168</span>.x.x:<span class="number">8080</span>/trade-dev2/IMAGE[:TAG]</span><br></pre></td></tr></table></figure>



<h3 id="3、创建harbor仓库名"><a href="#3、创建harbor仓库名" class="headerlink" title="3、创建harbor仓库名"></a>3、创建harbor仓库名</h3><p>镜像推送至harbor时需要创建仓库名，而无内网无法访问面板</p>
<p>通过命令行创建harbor镜像库（无内网访问下进行）</p>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_45019350/article/details/125021305">https://blog.csdn.net/weixin_45019350/article/details/125021305</a></p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">先看链接中的指引</span><br><span class="line">添加第一个common项目仓库</span><br><span class="line">insert into project(project_id,owner_id,name) values(&#x27;2&#x27;,&#x27;1&#x27;,&#x27;common&#x27;);</span><br><span class="line">insert into project_metadata(id,project_id,name,value) values(&#x27;2&#x27;,&#x27;2&#x27;,&#x27;public&#x27;,&#x27;true&#x27;);</span><br><span class="line">insert into project_member(id,project_id,entity_id,entity_type,role) values(&#x27;2&#x27;,&#x27;2&#x27;,&#x27;1&#x27;,&#x27;u&#x27;,&#x27;1&#x27;);</span><br><span class="line">insert into quota(id,reference,reference_id,hard) values(&#x27;2&#x27;,&#x27;project&#x27;,&#x27;2&#x27;,&#x27;&#123;&quot;storage&quot;: -1&#125;&#x27;);</span><br><span class="line">insert into quota_usage(id,reference,reference_id,used) values(&#x27;2&#x27;,&#x27;project&#x27;,&#x27;2&#x27;,&#x27;&#123;&quot;storage&quot;: 0&#125;&#x27;);      </span><br><span class="line"></span><br><span class="line">添加第二个prod项目仓库</span><br><span class="line">insert into project(project_id,owner_id,name) values(&#x27;3&#x27;,&#x27;1&#x27;,&#x27;prod&#x27;);</span><br><span class="line">insert into project_metadata(id,project_id,name,value) values(&#x27;3&#x27;,&#x27;3&#x27;,&#x27;public&#x27;,&#x27;true&#x27;);</span><br><span class="line">insert into project_member(id,project_id,entity_id,entity_type,role) values(&#x27;3&#x27;,&#x27;3&#x27;,&#x27;1&#x27;,&#x27;u&#x27;,&#x27;1&#x27;);</span><br><span class="line">insert into quota(id,reference,reference_id,hard) values(&#x27;3&#x27;,&#x27;project&#x27;,&#x27;3&#x27;,&#x27;&#123;&quot;storage&quot;: -1&#125;&#x27;);</span><br><span class="line">insert into quota_usage(id,reference,reference_id,used) values(&#x27;3&#x27;,&#x27;project&#x27;,&#x27;3&#x27;,&#x27;&#123;&quot;storage&quot;: 0&#125;&#x27;);</span><br></pre></td></tr></table></figure>

<h3 id="4、docker启动nacos"><a href="#4、docker启动nacos" class="headerlink" title="4、docker启动nacos"></a>4、docker启动nacos</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line">docker run -d \</span><br><span class="line">-e MODE=standalone \ </span><br><span class="line">-e SPRING_DATASOURCE_PLATFORM=mysql \ </span><br><span class="line">-e MYSQL_SERVICE_HOST=10.84.x.x \ </span><br><span class="line">-e MYSQL_SERVICE_USER=root \ </span><br><span class="line">-e MYSQL_SERVICE_PASSWORD=1qazxsw@3edc \ </span><br><span class="line">-e MYSQL_SERVICE_DB_NAME=nacos_config \ </span><br><span class="line">-e JVM_XMS=256m \</span><br><span class="line">-e JVM_XMX=256m \</span><br><span class="line">-e JVM_XMN=256m \</span><br><span class="line">-p 8848:8848 \</span><br><span class="line">-p 9848:9848 \</span><br><span class="line">--network 10.84.x.x \ </span><br><span class="line">--name nacos-sa-mysql \ </span><br><span class="line">--restart=always \</span><br><span class="line">nacos/nacos-server</span><br></pre></td></tr></table></figure>

<h3 id="5、docker启动xxl-job"><a href="#5、docker启动xxl-job" class="headerlink" title="5、docker启动xxl-job"></a>5、docker启动xxl-job</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">docker run -e PARAMS=&quot;--spring.datasource.url=jdbc:mysql://10.84.x.x:3306/xxl-job?Unicode=true&amp;characterEncoding=UTF-8 \</span><br><span class="line">--spring.datasource.username=root \</span><br><span class="line">--spring.datasource.password=1qazxsw@3edc \</span><br><span class="line">--spring.mail.host=smtp.qq.com \</span><br><span class="line">--spring.mail.port=25 \</span><br><span class="line">--spring.mail.from=1305366530@qq.com \</span><br><span class="line">--spring.mail.username=1305366530@qq.com \</span><br><span class="line">--spring.mail.password=123456 \</span><br><span class="line">--spring.mail.properties.mail.smtp.auth=true \</span><br><span class="line">--spring.mail.properties.mail.smtp.starttls.enable=true \</span><br><span class="line">--spring.mail.properties.mail.smtp.starttls.required=true \</span><br><span class="line">--spring.mail.properties.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory \</span><br><span class="line">--xxl.job.accessToken=xdsl3ewi3al1oehxmo68pqxer&quot; \</span><br><span class="line">-p 8094:8094  -v /data/root/xxl-job-data:/data/applogs \</span><br><span class="line">--name xxl-job-admin --restart=always  -d 10.84.x.x:8088/common/xxl-job-admin:latest</span><br></pre></td></tr></table></figure>

<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">docker run -d \</span><br><span class="line">-e PARAMS=&quot;--spring.datasource.url=jdbc:mysql://127.0.0.1:3306/xxl_job?useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true&amp;serverTimezone=UTC \</span><br><span class="line">--spring.datasource.username=root \</span><br><span class="line">--spring.datasource.password=123456 \</span><br><span class="line">--spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver&quot; \</span><br><span class="line">-p  8094:8080 \</span><br><span class="line">-v /Users/ldf/app/dockerVolume/xxl-job:/data/applogs \</span><br><span class="line">--name xxl-job-admin-arm64  \</span><br><span class="line">-d xxl-job-admin-arm64:latest</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h3 id="6、项目文件打包"><a href="#6、项目文件打包" class="headerlink" title="6、项目文件打包"></a>6、项目文件打包</h3><p>修改pom.xml中私仓的地址以及nacos配置</p>
<p>idea将项目打成jar包（maven需要选中激活哪个profile配置）</p>
<p>将每个服务的jar文件放入脚本文件夹中(jar放在公司提供的脚本package文件夹下)</p>
<h3 id="7、打包上传"><a href="#7、打包上传" class="headerlink" title="7、打包上传"></a>7、打包上传</h3><p>修改脚本文件java8的仓库地址，start.sh脚本中的仓库推送地址</p>
<p>脚本文件夹打包上传至政务云服务器中</p>
<p>解压运行脚本文件构建项目镜像</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">#启动项目调试</span><br><span class="line">docker run -p 10001:10001 -it -d 镜像id</span><br><span class="line">#查看启动日志</span><br><span class="line">docker logs -f 容器id</span><br></pre></td></tr></table></figure>

<h2 id="八、Kubesphere自制应用（yaml形式）"><a href="#八、Kubesphere自制应用（yaml形式）" class="headerlink" title="八、Kubesphere自制应用（yaml形式）"></a>八、Kubesphere自制应用（yaml形式）</h2><blockquote>
<p>本文采用的是yml的方式进行自制应用的构建，不同的项目只需要修改企业空间、镜像仓库以及数据库即可。温馨提示：本文是基于已有数据库以及项目上传到镜像仓库的前提下进行操作~</p>
</blockquote>
<h4 id="（1）nacos"><a href="#（1）nacos" class="headerlink" title="（1）nacos"></a>（1）nacos</h4><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">apiVersion:</span> <span class="string">app.k8s.io/v1beta1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Application</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">nacos</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">nacos</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">matchLabels:</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/name:</span> <span class="string">nacos</span></span><br><span class="line">  <span class="attr">addOwnerRef:</span> <span class="literal">true</span></span><br><span class="line">  <span class="attr">componentKinds:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">group:</span> <span class="string">&#x27;&#x27;</span></span><br><span class="line">      <span class="attr">kind:</span> <span class="string">Service</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">group:</span> <span class="string">apps</span></span><br><span class="line">      <span class="attr">kind:</span> <span class="string">Deployment</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">group:</span> <span class="string">apps</span></span><br><span class="line">      <span class="attr">kind:</span> <span class="string">StatefulSet</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">group:</span> <span class="string">extensions</span></span><br><span class="line">      <span class="attr">kind:</span> <span class="string">Ingress</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">group:</span> <span class="string">servicemesh.kubesphere.io</span></span><br><span class="line">      <span class="attr">kind:</span> <span class="string">Strategy</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">group:</span> <span class="string">servicemesh.kubesphere.io</span></span><br><span class="line">      <span class="attr">kind:</span> <span class="string">ServicePolicy</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">extensions/v1beta1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Ingress</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">nacos</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">nacos-ingress-i52okm</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">rules:</span> []</span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">apps/v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Deployment</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">nacos</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">nacos</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">nacos-v1</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">replicas:</span> <span class="number">1</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">matchLabels:</span></span><br><span class="line">      <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app:</span> <span class="string">nacos</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/name:</span> <span class="string">nacos</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">nacos</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">nacos</span></span><br><span class="line">      <span class="attr">annotations:</span></span><br><span class="line">        <span class="attr">logging.kubesphere.io/logsidecar-config:</span> <span class="string">&#x27;&#123;&#125;&#x27;</span></span><br><span class="line">        <span class="attr">sidecar.istio.io/inject:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">    <span class="attr">spec:</span></span><br><span class="line">      <span class="attr">containers:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">container-iy6dn0</span></span><br><span class="line">          <span class="attr">imagePullPolicy:</span> <span class="string">Always</span></span><br><span class="line">          <span class="attr">pullSecret:</span> <span class="string">harbor</span></span><br><span class="line">          <span class="attr">image:</span> <span class="string">&#x27;IP:8088/common/nacos-server:2.0.2&#x27;</span></span><br><span class="line">          <span class="attr">ports:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-8848</span></span><br><span class="line">              <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">              <span class="attr">containerPort:</span> <span class="number">8848</span></span><br><span class="line">              <span class="attr">servicePort:</span> <span class="number">8848</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-9848</span></span><br><span class="line">              <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">              <span class="attr">containerPort:</span> <span class="number">9848</span></span><br><span class="line">              <span class="attr">servicePort:</span> <span class="number">9848</span></span><br><span class="line">          <span class="attr">env:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">MYSQL_SERVICE_DB_NAME</span></span><br><span class="line">              <span class="attr">value:</span> <span class="string">nacos</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">MYSQL_SERVICE_DB_PARAM</span></span><br><span class="line">              <span class="attr">value:</span> <span class="string">&gt;-</span></span><br><span class="line"><span class="string">                useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true&amp;useSSL=false&amp;zeroDateTimeBehavior=convertToNull&amp;serverTimezone=Asia/Shanghai</span></span><br><span class="line"><span class="string"></span>            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">MYSQL_SERVICE_HOST</span></span><br><span class="line">              <span class="attr">value:</span> <span class="string">IP</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">MYSQL_SERVICE_PASSWORD</span></span><br><span class="line">              <span class="attr">value:</span> <span class="string">数据库密码</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">MYSQL_SERVICE_PORT</span></span><br><span class="line">              <span class="attr">value:</span> <span class="string">&#x27;3306&#x27;</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">MYSQL_SERVICE_USER</span></span><br><span class="line">              <span class="attr">value:</span> <span class="string">root</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">SPRING_DATASOURCE_PLATFORM</span></span><br><span class="line">              <span class="attr">value:</span> <span class="string">mysql</span></span><br><span class="line">          <span class="attr">volumeMounts:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/etc/localtime</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">true</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">nacos</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">false</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/home/nacos/data</span></span><br><span class="line">      <span class="attr">serviceAccount:</span> <span class="string">default</span></span><br><span class="line">      <span class="attr">affinity:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">initContainers:</span> []</span><br><span class="line">      <span class="attr">volumes:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">hostPath:</span></span><br><span class="line">            <span class="attr">path:</span> <span class="string">/etc/localtime</span></span><br><span class="line">            <span class="attr">type:</span> <span class="string">&#x27;&#x27;</span></span><br><span class="line">          <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">nacos</span></span><br><span class="line">          <span class="attr">emptyDir:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">imagePullSecrets:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">harbor</span></span><br><span class="line">  <span class="attr">strategy:</span></span><br><span class="line">    <span class="attr">type:</span> <span class="string">RollingUpdate</span></span><br><span class="line">    <span class="attr">rollingUpdate:</span></span><br><span class="line">      <span class="attr">maxUnavailable:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line">      <span class="attr">maxSurge:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Service</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">nacos</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">nacos</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">kubesphere.io/serviceType:</span> <span class="string">statelessservice</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">nacos</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">sessionAffinity:</span> <span class="string">None</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">nacos</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">nacos</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">nacos</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">nacos</span></span><br><span class="line">  <span class="attr">ports:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-8848</span></span><br><span class="line">      <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">      <span class="attr">port:</span> <span class="number">8848</span></span><br><span class="line">      <span class="attr">targetPort:</span> <span class="number">8848</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-9848</span></span><br><span class="line">      <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">      <span class="attr">port:</span> <span class="number">9848</span></span><br><span class="line">      <span class="attr">targetPort:</span> <span class="number">9848</span></span><br><span class="line">  <span class="attr">type:</span> <span class="string">NodePort</span></span><br></pre></td></tr></table></figure>



<h4 id="（2）xxl-job"><a href="#（2）xxl-job" class="headerlink" title="（2）xxl-job"></a>（2）xxl-job</h4><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">apiVersion:</span> <span class="string">app.k8s.io/v1beta1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Application</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">xxl-job</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">xxl-job</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">matchLabels:</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/name:</span> <span class="string">xxl-job</span></span><br><span class="line">  <span class="attr">addOwnerRef:</span> <span class="literal">true</span></span><br><span class="line">  <span class="attr">componentKinds:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">group:</span> <span class="string">&#x27;&#x27;</span></span><br><span class="line">      <span class="attr">kind:</span> <span class="string">Service</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">group:</span> <span class="string">apps</span></span><br><span class="line">      <span class="attr">kind:</span> <span class="string">Deployment</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">group:</span> <span class="string">apps</span></span><br><span class="line">      <span class="attr">kind:</span> <span class="string">StatefulSet</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">group:</span> <span class="string">extensions</span></span><br><span class="line">      <span class="attr">kind:</span> <span class="string">Ingress</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">group:</span> <span class="string">servicemesh.kubesphere.io</span></span><br><span class="line">      <span class="attr">kind:</span> <span class="string">Strategy</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">group:</span> <span class="string">servicemesh.kubesphere.io</span></span><br><span class="line">      <span class="attr">kind:</span> <span class="string">ServicePolicy</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">extensions/v1beta1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Ingress</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">xxl-job</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">xxl-job-ingress-j6ldh4</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">rules:</span> []</span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">apps/v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Deployment</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">xxl-job</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">xxl-job</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">xxl-job-v1</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">replicas:</span> <span class="number">1</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">matchLabels:</span></span><br><span class="line">      <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app:</span> <span class="string">xxl-job</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/name:</span> <span class="string">xxl-job</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">xxl-job</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">xxl-job</span></span><br><span class="line">      <span class="attr">annotations:</span></span><br><span class="line">        <span class="attr">logging.kubesphere.io/logsidecar-config:</span> <span class="string">&#x27;&#123;&#125;&#x27;</span></span><br><span class="line">        <span class="attr">sidecar.istio.io/inject:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">    <span class="attr">spec:</span></span><br><span class="line">      <span class="attr">containers:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">container-7qspzi</span></span><br><span class="line">          <span class="attr">imagePullPolicy:</span> <span class="string">IfNotPresent</span></span><br><span class="line">          <span class="attr">pullSecret:</span> <span class="string">harbor</span></span><br><span class="line">          <span class="attr">image:</span> <span class="string">&#x27;IP:8088/common/xxl-job-admin&#x27;</span></span><br><span class="line">          <span class="attr">ports:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">http-8094</span></span><br><span class="line">              <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">              <span class="attr">containerPort:</span> <span class="number">8094</span></span><br><span class="line">              <span class="attr">servicePort:</span> <span class="number">8094</span></span><br><span class="line">          <span class="attr">env:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">MYSQL_SERVICE_DB_NAME</span></span><br><span class="line">              <span class="attr">value:</span> <span class="string">xxl-job</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">MYSQL_SERVICE_HOST</span></span><br><span class="line">              <span class="attr">value:</span> <span class="string">IP</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">MYSQL_SERVICE_PORT</span></span><br><span class="line">              <span class="attr">value:</span> <span class="string">&#x27;3306&#x27;</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">MYSQL_SERVICE_PASSWORD</span></span><br><span class="line">              <span class="attr">value:</span> <span class="string">数据库密码</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">MYSQL_SERVICE_USER</span></span><br><span class="line">              <span class="attr">value:</span> <span class="string">root</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">SPRING_MAIL_HOST</span></span><br><span class="line">              <span class="attr">value:</span> <span class="string">imap.163.com</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">SPRING_MAIL_PORT</span></span><br><span class="line">              <span class="attr">value:</span> <span class="string">&#x27;143&#x27;</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">SPRING_MAIL_USERNAME</span></span><br><span class="line">              <span class="attr">value:</span> <span class="string">xk_admin@163.com</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">SPRING_MAIL_FROM</span></span><br><span class="line">              <span class="attr">value:</span> <span class="string">xk_admin@163.com</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">SPRING_MAIL_PASSWORD</span></span><br><span class="line">              <span class="attr">value:</span> <span class="string">MDBSBUJZFYASSOUS</span></span><br><span class="line">          <span class="attr">volumeMounts:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">false</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/app</span></span><br><span class="line">      <span class="attr">serviceAccount:</span> <span class="string">default</span></span><br><span class="line">      <span class="attr">affinity:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">initContainers:</span> []</span><br><span class="line">      <span class="attr">volumes:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">          <span class="attr">emptyDir:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">imagePullSecrets:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">harbor</span></span><br><span class="line">  <span class="attr">strategy:</span></span><br><span class="line">    <span class="attr">type:</span> <span class="string">RollingUpdate</span></span><br><span class="line">    <span class="attr">rollingUpdate:</span></span><br><span class="line">      <span class="attr">maxUnavailable:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line">      <span class="attr">maxSurge:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Service</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">xxl-job</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">xxl-job</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">kubesphere.io/serviceType:</span> <span class="string">statelessservice</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">xxl-job</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">sessionAffinity:</span> <span class="string">None</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">xxl-job</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">xxl-job</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">xxl-job</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">xxl-job</span></span><br><span class="line">  <span class="attr">ports:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">http-8094</span></span><br><span class="line">      <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">      <span class="attr">port:</span> <span class="number">8094</span></span><br><span class="line">      <span class="attr">targetPort:</span> <span class="number">8094</span></span><br><span class="line">  <span class="attr">type:</span> <span class="string">NodePort</span></span><br></pre></td></tr></table></figure>



<h4 id="（3）devops-cloud-cluster"><a href="#（3）devops-cloud-cluster" class="headerlink" title="（3）devops-cloud-cluster"></a>（3）devops-cloud-cluster</h4><figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br><span class="line">321</span><br><span class="line">322</span><br><span class="line">323</span><br><span class="line">324</span><br><span class="line">325</span><br><span class="line">326</span><br><span class="line">327</span><br><span class="line">328</span><br><span class="line">329</span><br><span class="line">330</span><br><span class="line">331</span><br><span class="line">332</span><br><span class="line">333</span><br><span class="line">334</span><br><span class="line">335</span><br><span class="line">336</span><br><span class="line">337</span><br><span class="line">338</span><br><span class="line">339</span><br><span class="line">340</span><br><span class="line">341</span><br><span class="line">342</span><br><span class="line">343</span><br><span class="line">344</span><br><span class="line">345</span><br><span class="line">346</span><br><span class="line">347</span><br><span class="line">348</span><br><span class="line">349</span><br><span class="line">350</span><br><span class="line">351</span><br><span class="line">352</span><br><span class="line">353</span><br><span class="line">354</span><br><span class="line">355</span><br><span class="line">356</span><br><span class="line">357</span><br><span class="line">358</span><br><span class="line">359</span><br><span class="line">360</span><br><span class="line">361</span><br><span class="line">362</span><br><span class="line">363</span><br><span class="line">364</span><br><span class="line">365</span><br><span class="line">366</span><br><span class="line">367</span><br><span class="line">368</span><br><span class="line">369</span><br><span class="line">370</span><br><span class="line">371</span><br><span class="line">372</span><br><span class="line">373</span><br><span class="line">374</span><br><span class="line">375</span><br><span class="line">376</span><br><span class="line">377</span><br><span class="line">378</span><br><span class="line">379</span><br><span class="line">380</span><br><span class="line">381</span><br><span class="line">382</span><br><span class="line">383</span><br><span class="line">384</span><br><span class="line">385</span><br><span class="line">386</span><br><span class="line">387</span><br><span class="line">388</span><br><span class="line">389</span><br><span class="line">390</span><br><span class="line">391</span><br><span class="line">392</span><br><span class="line">393</span><br><span class="line">394</span><br><span class="line">395</span><br><span class="line">396</span><br><span class="line">397</span><br><span class="line">398</span><br><span class="line">399</span><br><span class="line">400</span><br><span class="line">401</span><br><span class="line">402</span><br><span class="line">403</span><br><span class="line">404</span><br><span class="line">405</span><br><span class="line">406</span><br><span class="line">407</span><br><span class="line">408</span><br><span class="line">409</span><br><span class="line">410</span><br><span class="line">411</span><br><span class="line">412</span><br><span class="line">413</span><br><span class="line">414</span><br><span class="line">415</span><br><span class="line">416</span><br><span class="line">417</span><br><span class="line">418</span><br><span class="line">419</span><br><span class="line">420</span><br><span class="line">421</span><br><span class="line">422</span><br><span class="line">423</span><br><span class="line">424</span><br><span class="line">425</span><br><span class="line">426</span><br><span class="line">427</span><br><span class="line">428</span><br><span class="line">429</span><br><span class="line">430</span><br><span class="line">431</span><br><span class="line">432</span><br><span class="line">433</span><br><span class="line">434</span><br><span class="line">435</span><br><span class="line">436</span><br><span class="line">437</span><br><span class="line">438</span><br><span class="line">439</span><br><span class="line">440</span><br><span class="line">441</span><br><span class="line">442</span><br><span class="line">443</span><br><span class="line">444</span><br><span class="line">445</span><br><span class="line">446</span><br><span class="line">447</span><br><span class="line">448</span><br><span class="line">449</span><br><span class="line">450</span><br><span class="line">451</span><br><span class="line">452</span><br><span class="line">453</span><br><span class="line">454</span><br><span class="line">455</span><br><span class="line">456</span><br><span class="line">457</span><br><span class="line">458</span><br><span class="line">459</span><br><span class="line">460</span><br><span class="line">461</span><br><span class="line">462</span><br><span class="line">463</span><br><span class="line">464</span><br><span class="line">465</span><br><span class="line">466</span><br><span class="line">467</span><br><span class="line">468</span><br><span class="line">469</span><br><span class="line">470</span><br><span class="line">471</span><br><span class="line">472</span><br><span class="line">473</span><br><span class="line">474</span><br><span class="line">475</span><br><span class="line">476</span><br><span class="line">477</span><br><span class="line">478</span><br><span class="line">479</span><br><span class="line">480</span><br><span class="line">481</span><br><span class="line">482</span><br><span class="line">483</span><br><span class="line">484</span><br><span class="line">485</span><br><span class="line">486</span><br><span class="line">487</span><br><span class="line">488</span><br><span class="line">489</span><br><span class="line">490</span><br><span class="line">491</span><br><span class="line">492</span><br><span class="line">493</span><br><span class="line">494</span><br><span class="line">495</span><br><span class="line">496</span><br><span class="line">497</span><br><span class="line">498</span><br><span class="line">499</span><br><span class="line">500</span><br><span class="line">501</span><br><span class="line">502</span><br><span class="line">503</span><br><span class="line">504</span><br><span class="line">505</span><br><span class="line">506</span><br><span class="line">507</span><br><span class="line">508</span><br><span class="line">509</span><br><span class="line">510</span><br><span class="line">511</span><br><span class="line">512</span><br><span class="line">513</span><br><span class="line">514</span><br><span class="line">515</span><br><span class="line">516</span><br><span class="line">517</span><br><span class="line">518</span><br><span class="line">519</span><br><span class="line">520</span><br><span class="line">521</span><br><span class="line">522</span><br><span class="line">523</span><br><span class="line">524</span><br><span class="line">525</span><br><span class="line">526</span><br><span class="line">527</span><br><span class="line">528</span><br><span class="line">529</span><br><span class="line">530</span><br><span class="line">531</span><br><span class="line">532</span><br><span class="line">533</span><br><span class="line">534</span><br><span class="line">535</span><br><span class="line">536</span><br><span class="line">537</span><br><span class="line">538</span><br><span class="line">539</span><br><span class="line">540</span><br><span class="line">541</span><br><span class="line">542</span><br><span class="line">543</span><br><span class="line">544</span><br><span class="line">545</span><br><span class="line">546</span><br><span class="line">547</span><br><span class="line">548</span><br><span class="line">549</span><br><span class="line">550</span><br><span class="line">551</span><br><span class="line">552</span><br><span class="line">553</span><br><span class="line">554</span><br><span class="line">555</span><br><span class="line">556</span><br><span class="line">557</span><br><span class="line">558</span><br><span class="line">559</span><br><span class="line">560</span><br><span class="line">561</span><br><span class="line">562</span><br><span class="line">563</span><br><span class="line">564</span><br><span class="line">565</span><br><span class="line">566</span><br><span class="line">567</span><br><span class="line">568</span><br><span class="line">569</span><br><span class="line">570</span><br><span class="line">571</span><br><span class="line">572</span><br><span class="line">573</span><br><span class="line">574</span><br><span class="line">575</span><br><span class="line">576</span><br><span class="line">577</span><br><span class="line">578</span><br><span class="line">579</span><br><span class="line">580</span><br><span class="line">581</span><br><span class="line">582</span><br><span class="line">583</span><br><span class="line">584</span><br><span class="line">585</span><br><span class="line">586</span><br><span class="line">587</span><br><span class="line">588</span><br><span class="line">589</span><br><span class="line">590</span><br><span class="line">591</span><br><span class="line">592</span><br><span class="line">593</span><br><span class="line">594</span><br><span class="line">595</span><br><span class="line">596</span><br><span class="line">597</span><br><span class="line">598</span><br><span class="line">599</span><br><span class="line">600</span><br><span class="line">601</span><br><span class="line">602</span><br><span class="line">603</span><br><span class="line">604</span><br><span class="line">605</span><br><span class="line">606</span><br><span class="line">607</span><br><span class="line">608</span><br><span class="line">609</span><br><span class="line">610</span><br><span class="line">611</span><br><span class="line">612</span><br><span class="line">613</span><br><span class="line">614</span><br><span class="line">615</span><br><span class="line">616</span><br><span class="line">617</span><br><span class="line">618</span><br><span class="line">619</span><br><span class="line">620</span><br><span class="line">621</span><br><span class="line">622</span><br><span class="line">623</span><br><span class="line">624</span><br><span class="line">625</span><br><span class="line">626</span><br><span class="line">627</span><br><span class="line">628</span><br><span class="line">629</span><br><span class="line">630</span><br><span class="line">631</span><br><span class="line">632</span><br><span class="line">633</span><br><span class="line">634</span><br><span class="line">635</span><br><span class="line">636</span><br><span class="line">637</span><br><span class="line">638</span><br><span class="line">639</span><br><span class="line">640</span><br><span class="line">641</span><br><span class="line">642</span><br><span class="line">643</span><br><span class="line">644</span><br><span class="line">645</span><br><span class="line">646</span><br><span class="line">647</span><br><span class="line">648</span><br><span class="line">649</span><br><span class="line">650</span><br><span class="line">651</span><br><span class="line">652</span><br><span class="line">653</span><br><span class="line">654</span><br><span class="line">655</span><br><span class="line">656</span><br><span class="line">657</span><br><span class="line">658</span><br><span class="line">659</span><br><span class="line">660</span><br><span class="line">661</span><br><span class="line">662</span><br><span class="line">663</span><br><span class="line">664</span><br><span class="line">665</span><br><span class="line">666</span><br><span class="line">667</span><br><span class="line">668</span><br><span class="line">669</span><br><span class="line">670</span><br><span class="line">671</span><br><span class="line">672</span><br><span class="line">673</span><br><span class="line">674</span><br><span class="line">675</span><br><span class="line">676</span><br><span class="line">677</span><br><span class="line">678</span><br><span class="line">679</span><br><span class="line">680</span><br><span class="line">681</span><br><span class="line">682</span><br><span class="line">683</span><br><span class="line">684</span><br><span class="line">685</span><br><span class="line">686</span><br><span class="line">687</span><br><span class="line">688</span><br><span class="line">689</span><br><span class="line">690</span><br><span class="line">691</span><br><span class="line">692</span><br><span class="line">693</span><br><span class="line">694</span><br><span class="line">695</span><br><span class="line">696</span><br><span class="line">697</span><br><span class="line">698</span><br><span class="line">699</span><br><span class="line">700</span><br><span class="line">701</span><br><span class="line">702</span><br><span class="line">703</span><br><span class="line">704</span><br><span class="line">705</span><br><span class="line">706</span><br><span class="line">707</span><br><span class="line">708</span><br><span class="line">709</span><br><span class="line">710</span><br><span class="line">711</span><br><span class="line">712</span><br><span class="line">713</span><br><span class="line">714</span><br><span class="line">715</span><br><span class="line">716</span><br><span class="line">717</span><br><span class="line">718</span><br><span class="line">719</span><br><span class="line">720</span><br><span class="line">721</span><br><span class="line">722</span><br><span class="line">723</span><br><span class="line">724</span><br><span class="line">725</span><br><span class="line">726</span><br><span class="line">727</span><br><span class="line">728</span><br><span class="line">729</span><br><span class="line">730</span><br><span class="line">731</span><br><span class="line">732</span><br><span class="line">733</span><br><span class="line">734</span><br><span class="line">735</span><br><span class="line">736</span><br><span class="line">737</span><br><span class="line">738</span><br><span class="line">739</span><br><span class="line">740</span><br><span class="line">741</span><br><span class="line">742</span><br><span class="line">743</span><br><span class="line">744</span><br><span class="line">745</span><br><span class="line">746</span><br><span class="line">747</span><br><span class="line">748</span><br><span class="line">749</span><br><span class="line">750</span><br><span class="line">751</span><br><span class="line">752</span><br><span class="line">753</span><br><span class="line">754</span><br><span class="line">755</span><br><span class="line">756</span><br><span class="line">757</span><br><span class="line">758</span><br><span class="line">759</span><br><span class="line">760</span><br><span class="line">761</span><br><span class="line">762</span><br><span class="line">763</span><br><span class="line">764</span><br><span class="line">765</span><br><span class="line">766</span><br><span class="line">767</span><br><span class="line">768</span><br><span class="line">769</span><br><span class="line">770</span><br><span class="line">771</span><br><span class="line">772</span><br><span class="line">773</span><br><span class="line">774</span><br><span class="line">775</span><br><span class="line">776</span><br><span class="line">777</span><br><span class="line">778</span><br><span class="line">779</span><br><span class="line">780</span><br><span class="line">781</span><br><span class="line">782</span><br><span class="line">783</span><br><span class="line">784</span><br><span class="line">785</span><br><span class="line">786</span><br><span class="line">787</span><br><span class="line">788</span><br><span class="line">789</span><br><span class="line">790</span><br><span class="line">791</span><br><span class="line">792</span><br><span class="line">793</span><br><span class="line">794</span><br><span class="line">795</span><br><span class="line">796</span><br><span class="line">797</span><br><span class="line">798</span><br><span class="line">799</span><br><span class="line">800</span><br><span class="line">801</span><br><span class="line">802</span><br><span class="line">803</span><br><span class="line">804</span><br><span class="line">805</span><br><span class="line">806</span><br><span class="line">807</span><br><span class="line">808</span><br><span class="line">809</span><br><span class="line">810</span><br><span class="line">811</span><br><span class="line">812</span><br><span class="line">813</span><br><span class="line">814</span><br><span class="line">815</span><br><span class="line">816</span><br><span class="line">817</span><br><span class="line">818</span><br><span class="line">819</span><br><span class="line">820</span><br><span class="line">821</span><br><span class="line">822</span><br><span class="line">823</span><br><span class="line">824</span><br><span class="line">825</span><br><span class="line">826</span><br><span class="line">827</span><br><span class="line">828</span><br><span class="line">829</span><br><span class="line">830</span><br><span class="line">831</span><br><span class="line">832</span><br><span class="line">833</span><br><span class="line">834</span><br><span class="line">835</span><br><span class="line">836</span><br><span class="line">837</span><br><span class="line">838</span><br><span class="line">839</span><br><span class="line">840</span><br><span class="line">841</span><br><span class="line">842</span><br><span class="line">843</span><br><span class="line">844</span><br><span class="line">845</span><br><span class="line">846</span><br><span class="line">847</span><br><span class="line">848</span><br><span class="line">849</span><br><span class="line">850</span><br><span class="line">851</span><br><span class="line">852</span><br><span class="line">853</span><br><span class="line">854</span><br><span class="line">855</span><br><span class="line">856</span><br><span class="line">857</span><br><span class="line">858</span><br><span class="line">859</span><br><span class="line">860</span><br><span class="line">861</span><br><span class="line">862</span><br><span class="line">863</span><br><span class="line">864</span><br><span class="line">865</span><br><span class="line">866</span><br><span class="line">867</span><br><span class="line">868</span><br><span class="line">869</span><br><span class="line">870</span><br><span class="line">871</span><br><span class="line">872</span><br><span class="line">873</span><br><span class="line">874</span><br><span class="line">875</span><br><span class="line">876</span><br><span class="line">877</span><br><span class="line">878</span><br><span class="line">879</span><br><span class="line">880</span><br><span class="line">881</span><br><span class="line">882</span><br><span class="line">883</span><br><span class="line">884</span><br><span class="line">885</span><br><span class="line">886</span><br><span class="line">887</span><br><span class="line">888</span><br><span class="line">889</span><br><span class="line">890</span><br><span class="line">891</span><br><span class="line">892</span><br><span class="line">893</span><br><span class="line">894</span><br><span class="line">895</span><br><span class="line">896</span><br><span class="line">897</span><br><span class="line">898</span><br><span class="line">899</span><br><span class="line">900</span><br><span class="line">901</span><br><span class="line">902</span><br><span class="line">903</span><br><span class="line">904</span><br><span class="line">905</span><br><span class="line">906</span><br><span class="line">907</span><br><span class="line">908</span><br><span class="line">909</span><br><span class="line">910</span><br><span class="line">911</span><br><span class="line">912</span><br><span class="line">913</span><br><span class="line">914</span><br><span class="line">915</span><br><span class="line">916</span><br><span class="line">917</span><br><span class="line">918</span><br><span class="line">919</span><br><span class="line">920</span><br><span class="line">921</span><br><span class="line">922</span><br><span class="line">923</span><br><span class="line">924</span><br><span class="line">925</span><br><span class="line">926</span><br><span class="line">927</span><br><span class="line">928</span><br><span class="line">929</span><br><span class="line">930</span><br><span class="line">931</span><br><span class="line">932</span><br><span class="line">933</span><br><span class="line">934</span><br><span class="line">935</span><br><span class="line">936</span><br><span class="line">937</span><br><span class="line">938</span><br><span class="line">939</span><br><span class="line">940</span><br><span class="line">941</span><br><span class="line">942</span><br><span class="line">943</span><br><span class="line">944</span><br><span class="line">945</span><br><span class="line">946</span><br><span class="line">947</span><br><span class="line">948</span><br><span class="line">949</span><br><span class="line">950</span><br><span class="line">951</span><br><span class="line">952</span><br><span class="line">953</span><br><span class="line">954</span><br><span class="line">955</span><br><span class="line">956</span><br><span class="line">957</span><br><span class="line">958</span><br><span class="line">959</span><br><span class="line">960</span><br><span class="line">961</span><br><span class="line">962</span><br><span class="line">963</span><br><span class="line">964</span><br><span class="line">965</span><br><span class="line">966</span><br><span class="line">967</span><br><span class="line">968</span><br><span class="line">969</span><br><span class="line">970</span><br><span class="line">971</span><br><span class="line">972</span><br><span class="line">973</span><br><span class="line">974</span><br><span class="line">975</span><br><span class="line">976</span><br><span class="line">977</span><br><span class="line">978</span><br><span class="line">979</span><br><span class="line">980</span><br><span class="line">981</span><br><span class="line">982</span><br><span class="line">983</span><br><span class="line">984</span><br><span class="line">985</span><br><span class="line">986</span><br><span class="line">987</span><br><span class="line">988</span><br><span class="line">989</span><br><span class="line">990</span><br><span class="line">991</span><br><span class="line">992</span><br><span class="line">993</span><br><span class="line">994</span><br><span class="line">995</span><br><span class="line">996</span><br><span class="line">997</span><br><span class="line">998</span><br><span class="line">999</span><br><span class="line">1000</span><br><span class="line">1001</span><br><span class="line">1002</span><br><span class="line">1003</span><br><span class="line">1004</span><br><span class="line">1005</span><br><span class="line">1006</span><br><span class="line">1007</span><br><span class="line">1008</span><br><span class="line">1009</span><br><span class="line">1010</span><br><span class="line">1011</span><br><span class="line">1012</span><br><span class="line">1013</span><br><span class="line">1014</span><br><span class="line">1015</span><br><span class="line">1016</span><br><span class="line">1017</span><br><span class="line">1018</span><br><span class="line">1019</span><br><span class="line">1020</span><br><span class="line">1021</span><br><span class="line">1022</span><br><span class="line">1023</span><br><span class="line">1024</span><br><span class="line">1025</span><br><span class="line">1026</span><br><span class="line">1027</span><br><span class="line">1028</span><br><span class="line">1029</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">apiVersion:</span> <span class="string">app.k8s.io/v1beta1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Application</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">matchLabels:</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">addOwnerRef:</span> <span class="literal">true</span></span><br><span class="line">  <span class="attr">componentKinds:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">group:</span> <span class="string">&#x27;&#x27;</span></span><br><span class="line">      <span class="attr">kind:</span> <span class="string">Service</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">group:</span> <span class="string">apps</span></span><br><span class="line">      <span class="attr">kind:</span> <span class="string">Deployment</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">group:</span> <span class="string">apps</span></span><br><span class="line">      <span class="attr">kind:</span> <span class="string">StatefulSet</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">group:</span> <span class="string">extensions</span></span><br><span class="line">      <span class="attr">kind:</span> <span class="string">Ingress</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">group:</span> <span class="string">servicemesh.kubesphere.io</span></span><br><span class="line">      <span class="attr">kind:</span> <span class="string">Strategy</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">group:</span> <span class="string">servicemesh.kubesphere.io</span></span><br><span class="line">      <span class="attr">kind:</span> <span class="string">ServicePolicy</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">extensions/v1beta1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Ingress</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-cloud-cluster-ingress-dydnej</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">rules:</span> []</span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">apps/v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Deployment</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-cloud-gateway</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-cloud-gateway-v1</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">replicas:</span> <span class="number">4</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">matchLabels:</span></span><br><span class="line">      <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app:</span> <span class="string">devops-cloud-gateway</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">devops-cloud-gateway</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">      <span class="attr">annotations:</span></span><br><span class="line">        <span class="attr">logging.kubesphere.io/logsidecar-config:</span> <span class="string">&#x27;&#123;&#125;&#x27;</span></span><br><span class="line">        <span class="attr">sidecar.istio.io/inject:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">    <span class="attr">spec:</span></span><br><span class="line">      <span class="attr">containers:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">container-n68t1b</span></span><br><span class="line">          <span class="attr">imagePullPolicy:</span> <span class="string">Always</span></span><br><span class="line">          <span class="attr">pullSecret:</span> <span class="string">harbor</span></span><br><span class="line">          <span class="attr">image:</span> <span class="string">&#x27;IP:8088/prod/devops-cloud-gateway:latest&#x27;</span></span><br><span class="line">          <span class="attr">ports:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-10001</span></span><br><span class="line">              <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">              <span class="attr">containerPort:</span> <span class="number">10001</span></span><br><span class="line">              <span class="attr">servicePort:</span> <span class="number">10001</span></span><br><span class="line">          <span class="attr">volumeMounts:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/etc/localtime</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">true</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">false</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/app</span></span><br><span class="line">      <span class="attr">serviceAccount:</span> <span class="string">default</span></span><br><span class="line">      <span class="attr">affinity:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">initContainers:</span> []</span><br><span class="line">      <span class="attr">volumes:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">hostPath:</span></span><br><span class="line">            <span class="attr">path:</span> <span class="string">/etc/localtime</span></span><br><span class="line">            <span class="attr">type:</span> <span class="string">&#x27;&#x27;</span></span><br><span class="line">          <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">          <span class="attr">emptyDir:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">imagePullSecrets:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">harbor</span></span><br><span class="line">  <span class="attr">strategy:</span></span><br><span class="line">    <span class="attr">type:</span> <span class="string">RollingUpdate</span></span><br><span class="line">    <span class="attr">rollingUpdate:</span></span><br><span class="line">      <span class="attr">maxUnavailable:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line">      <span class="attr">maxSurge:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Service</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-cloud-gateway</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">kubesphere.io/serviceType:</span> <span class="string">statelessservice</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-cloud-gateway</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">sessionAffinity:</span> <span class="string">None</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-cloud-gateway</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">devops-cloud-gateway</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">ports:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-10001</span></span><br><span class="line">      <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">      <span class="attr">port:</span> <span class="number">10001</span></span><br><span class="line">      <span class="attr">targetPort:</span> <span class="number">10001</span></span><br><span class="line">  <span class="attr">type:</span> <span class="string">NodePort</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">apps/v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Deployment</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-system</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-system-v1</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">replicas:</span> <span class="number">1</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">matchLabels:</span></span><br><span class="line">      <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app:</span> <span class="string">devops-system</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">devops-system</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">      <span class="attr">annotations:</span></span><br><span class="line">        <span class="attr">logging.kubesphere.io/logsidecar-config:</span> <span class="string">&#x27;&#123;&#125;&#x27;</span></span><br><span class="line">        <span class="attr">sidecar.istio.io/inject:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">    <span class="attr">spec:</span></span><br><span class="line">      <span class="attr">containers:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">container-bejgi2</span></span><br><span class="line">          <span class="attr">imagePullPolicy:</span> <span class="string">Always</span></span><br><span class="line">          <span class="attr">pullSecret:</span> <span class="string">harbor</span></span><br><span class="line">          <span class="attr">image:</span> <span class="string">&#x27;IP:8088/prod/devops-system&#x27;</span></span><br><span class="line">          <span class="attr">ports:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-10003</span></span><br><span class="line">              <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">              <span class="attr">containerPort:</span> <span class="number">10003</span></span><br><span class="line">              <span class="attr">servicePort:</span> <span class="number">10003</span></span><br><span class="line">          <span class="attr">volumeMounts:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/etc/localtime</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">true</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">false</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/app</span></span><br><span class="line">      <span class="attr">serviceAccount:</span> <span class="string">default</span></span><br><span class="line">      <span class="attr">affinity:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">initContainers:</span> []</span><br><span class="line">      <span class="attr">volumes:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">hostPath:</span></span><br><span class="line">            <span class="attr">path:</span> <span class="string">/etc/localtime</span></span><br><span class="line">            <span class="attr">type:</span> <span class="string">&#x27;&#x27;</span></span><br><span class="line">          <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">          <span class="attr">emptyDir:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">imagePullSecrets:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">harbor</span></span><br><span class="line">  <span class="attr">strategy:</span></span><br><span class="line">    <span class="attr">type:</span> <span class="string">RollingUpdate</span></span><br><span class="line">    <span class="attr">rollingUpdate:</span></span><br><span class="line">      <span class="attr">maxUnavailable:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line">      <span class="attr">maxSurge:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Service</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-system</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">kubesphere.io/serviceType:</span> <span class="string">statelessservice</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-system</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">sessionAffinity:</span> <span class="string">None</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-system</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">devops-system</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">ports:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-10003</span></span><br><span class="line">      <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">      <span class="attr">port:</span> <span class="number">10003</span></span><br><span class="line">      <span class="attr">targetPort:</span> <span class="number">10003</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">apps/v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Deployment</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-trade-aggregate</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-trade-aggregate-v1</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">replicas:</span> <span class="number">4</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">matchLabels:</span></span><br><span class="line">      <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app:</span> <span class="string">devops-trade-aggregate</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">devops-trade-aggregate</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">      <span class="attr">annotations:</span></span><br><span class="line">        <span class="attr">logging.kubesphere.io/logsidecar-config:</span> <span class="string">&#x27;&#123;&#125;&#x27;</span></span><br><span class="line">        <span class="attr">sidecar.istio.io/inject:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">    <span class="attr">spec:</span></span><br><span class="line">      <span class="attr">containers:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">container-v6eeyv</span></span><br><span class="line">          <span class="attr">imagePullPolicy:</span> <span class="string">Always</span></span><br><span class="line">          <span class="attr">pullSecret:</span> <span class="string">harbor</span></span><br><span class="line">          <span class="attr">image:</span> <span class="string">&#x27;IP:8088/prod/devops-trade-aggregate&#x27;</span></span><br><span class="line">          <span class="attr">ports:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-10005</span></span><br><span class="line">              <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">              <span class="attr">containerPort:</span> <span class="number">10005</span></span><br><span class="line">              <span class="attr">servicePort:</span> <span class="number">10005</span></span><br><span class="line">          <span class="attr">volumeMounts:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/etc/localtime</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">true</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">false</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/app</span></span><br><span class="line">      <span class="attr">serviceAccount:</span> <span class="string">default</span></span><br><span class="line">      <span class="attr">affinity:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">initContainers:</span> []</span><br><span class="line">      <span class="attr">volumes:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">hostPath:</span></span><br><span class="line">            <span class="attr">path:</span> <span class="string">/etc/localtime</span></span><br><span class="line">            <span class="attr">type:</span> <span class="string">&#x27;&#x27;</span></span><br><span class="line">          <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">          <span class="attr">emptyDir:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">imagePullSecrets:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">harbor</span></span><br><span class="line">  <span class="attr">strategy:</span></span><br><span class="line">    <span class="attr">type:</span> <span class="string">RollingUpdate</span></span><br><span class="line">    <span class="attr">rollingUpdate:</span></span><br><span class="line">      <span class="attr">maxUnavailable:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line">      <span class="attr">maxSurge:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Service</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-trade-aggregate</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">kubesphere.io/serviceType:</span> <span class="string">statelessservice</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-trade-aggregate</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">sessionAffinity:</span> <span class="string">None</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-trade-aggregate</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">devops-trade-aggregate</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">ports:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-10005</span></span><br><span class="line">      <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">      <span class="attr">port:</span> <span class="number">10005</span></span><br><span class="line">      <span class="attr">targetPort:</span> <span class="number">10005</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">apps/v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Deployment</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-trade-main</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-trade-main-v1</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">replicas:</span> <span class="number">4</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">matchLabels:</span></span><br><span class="line">      <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app:</span> <span class="string">devops-trade-main</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">devops-trade-main</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">      <span class="attr">annotations:</span></span><br><span class="line">        <span class="attr">logging.kubesphere.io/logsidecar-config:</span> <span class="string">&#x27;&#123;&#125;&#x27;</span></span><br><span class="line">        <span class="attr">sidecar.istio.io/inject:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">    <span class="attr">spec:</span></span><br><span class="line">      <span class="attr">containers:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">container-omhakh</span></span><br><span class="line">          <span class="attr">imagePullPolicy:</span> <span class="string">Always</span></span><br><span class="line">          <span class="attr">pullSecret:</span> <span class="string">harbor</span></span><br><span class="line">          <span class="attr">image:</span> <span class="string">&#x27;IP:8088/prod/devops-trade-main&#x27;</span></span><br><span class="line">          <span class="attr">ports:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-10006</span></span><br><span class="line">              <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">              <span class="attr">containerPort:</span> <span class="number">10006</span></span><br><span class="line">              <span class="attr">servicePort:</span> <span class="number">10006</span></span><br><span class="line">          <span class="attr">volumeMounts:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/etc/localtime</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">true</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">false</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/app</span></span><br><span class="line">      <span class="attr">serviceAccount:</span> <span class="string">default</span></span><br><span class="line">      <span class="attr">affinity:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">initContainers:</span> []</span><br><span class="line">      <span class="attr">volumes:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">hostPath:</span></span><br><span class="line">            <span class="attr">path:</span> <span class="string">/etc/localtime</span></span><br><span class="line">            <span class="attr">type:</span> <span class="string">&#x27;&#x27;</span></span><br><span class="line">          <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">          <span class="attr">emptyDir:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">imagePullSecrets:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">harbor</span></span><br><span class="line">  <span class="attr">strategy:</span></span><br><span class="line">    <span class="attr">type:</span> <span class="string">RollingUpdate</span></span><br><span class="line">    <span class="attr">rollingUpdate:</span></span><br><span class="line">      <span class="attr">maxUnavailable:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line">      <span class="attr">maxSurge:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Service</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-trade-main</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">kubesphere.io/serviceType:</span> <span class="string">statelessservice</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-trade-main</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">sessionAffinity:</span> <span class="string">None</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-trade-main</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">devops-trade-main</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">ports:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-10006</span></span><br><span class="line">      <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">      <span class="attr">port:</span> <span class="number">10006</span></span><br><span class="line">      <span class="attr">targetPort:</span> <span class="number">10006</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">apps/v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Deployment</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-trade-object</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-trade-object-v1</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">replicas:</span> <span class="number">4</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">matchLabels:</span></span><br><span class="line">      <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app:</span> <span class="string">devops-trade-object</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">devops-trade-object</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">      <span class="attr">annotations:</span></span><br><span class="line">        <span class="attr">logging.kubesphere.io/logsidecar-config:</span> <span class="string">&#x27;&#123;&#125;&#x27;</span></span><br><span class="line">        <span class="attr">sidecar.istio.io/inject:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">    <span class="attr">spec:</span></span><br><span class="line">      <span class="attr">containers:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">container-rsvqcf</span></span><br><span class="line">          <span class="attr">imagePullPolicy:</span> <span class="string">Always</span></span><br><span class="line">          <span class="attr">pullSecret:</span> <span class="string">harbor</span></span><br><span class="line">          <span class="attr">image:</span> <span class="string">&#x27;IP:8088/prod/devops-trade-object&#x27;</span></span><br><span class="line">          <span class="attr">ports:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-10007</span></span><br><span class="line">              <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">              <span class="attr">containerPort:</span> <span class="number">10007</span></span><br><span class="line">              <span class="attr">servicePort:</span> <span class="number">10007</span></span><br><span class="line">          <span class="attr">volumeMounts:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/etc/localtime</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">true</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">false</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/app</span></span><br><span class="line">      <span class="attr">serviceAccount:</span> <span class="string">default</span></span><br><span class="line">      <span class="attr">affinity:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">initContainers:</span> []</span><br><span class="line">      <span class="attr">volumes:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">hostPath:</span></span><br><span class="line">            <span class="attr">path:</span> <span class="string">/etc/localtime</span></span><br><span class="line">            <span class="attr">type:</span> <span class="string">&#x27;&#x27;</span></span><br><span class="line">          <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">          <span class="attr">emptyDir:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">imagePullSecrets:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">harbor</span></span><br><span class="line">  <span class="attr">strategy:</span></span><br><span class="line">    <span class="attr">type:</span> <span class="string">RollingUpdate</span></span><br><span class="line">    <span class="attr">rollingUpdate:</span></span><br><span class="line">      <span class="attr">maxUnavailable:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line">      <span class="attr">maxSurge:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Service</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-trade-object</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">kubesphere.io/serviceType:</span> <span class="string">statelessservice</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-trade-object</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">sessionAffinity:</span> <span class="string">None</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-trade-object</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">devops-trade-object</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">ports:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-10007</span></span><br><span class="line">      <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">      <span class="attr">port:</span> <span class="number">10007</span></span><br><span class="line">      <span class="attr">targetPort:</span> <span class="number">10007</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">apps/v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Deployment</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-trade-pay</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-trade-pay-v1</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">replicas:</span> <span class="number">1</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">matchLabels:</span></span><br><span class="line">      <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app:</span> <span class="string">devops-trade-pay</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">devops-trade-pay</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">      <span class="attr">annotations:</span></span><br><span class="line">        <span class="attr">logging.kubesphere.io/logsidecar-config:</span> <span class="string">&#x27;&#123;&#125;&#x27;</span></span><br><span class="line">        <span class="attr">sidecar.istio.io/inject:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">    <span class="attr">spec:</span></span><br><span class="line">      <span class="attr">containers:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">container-7xq5cc</span></span><br><span class="line">          <span class="attr">imagePullPolicy:</span> <span class="string">Always</span></span><br><span class="line">          <span class="attr">pullSecret:</span> <span class="string">harbor</span></span><br><span class="line">          <span class="attr">image:</span> <span class="string">&#x27;IP:8088/prod/devops-trade-pay&#x27;</span></span><br><span class="line">          <span class="attr">ports:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-10008</span></span><br><span class="line">              <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">              <span class="attr">containerPort:</span> <span class="number">10008</span></span><br><span class="line">              <span class="attr">servicePort:</span> <span class="number">10008</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-8201</span></span><br><span class="line">              <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">              <span class="attr">containerPort:</span> <span class="number">8201</span></span><br><span class="line">              <span class="attr">servicePort:</span> <span class="number">8201</span></span><br><span class="line">          <span class="attr">volumeMounts:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/etc/localtime</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">true</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">false</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/app</span></span><br><span class="line">      <span class="attr">serviceAccount:</span> <span class="string">default</span></span><br><span class="line">      <span class="attr">affinity:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">initContainers:</span> []</span><br><span class="line">      <span class="attr">volumes:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">hostPath:</span></span><br><span class="line">            <span class="attr">path:</span> <span class="string">/etc/localtime</span></span><br><span class="line">            <span class="attr">type:</span> <span class="string">&#x27;&#x27;</span></span><br><span class="line">          <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">          <span class="attr">emptyDir:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">imagePullSecrets:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">harbor</span></span><br><span class="line">  <span class="attr">strategy:</span></span><br><span class="line">    <span class="attr">type:</span> <span class="string">RollingUpdate</span></span><br><span class="line">    <span class="attr">rollingUpdate:</span></span><br><span class="line">      <span class="attr">maxUnavailable:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line">      <span class="attr">maxSurge:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Service</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-trade-pay</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">kubesphere.io/serviceType:</span> <span class="string">statelessservice</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-trade-pay</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">sessionAffinity:</span> <span class="string">None</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-trade-pay</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">devops-trade-pay</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">ports:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-10008</span></span><br><span class="line">      <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">      <span class="attr">port:</span> <span class="number">10008</span></span><br><span class="line">      <span class="attr">targetPort:</span> <span class="number">10008</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-8201</span></span><br><span class="line">      <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">      <span class="attr">port:</span> <span class="number">8201</span></span><br><span class="line">      <span class="attr">targetPort:</span> <span class="number">8201</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">apps/v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Deployment</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-trade-process</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-trade-process-v1</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">replicas:</span> <span class="number">1</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">matchLabels:</span></span><br><span class="line">      <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app:</span> <span class="string">devops-trade-process</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">devops-trade-process</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">      <span class="attr">annotations:</span></span><br><span class="line">        <span class="attr">logging.kubesphere.io/logsidecar-config:</span> <span class="string">&#x27;&#123;&#125;&#x27;</span></span><br><span class="line">        <span class="attr">sidecar.istio.io/inject:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">    <span class="attr">spec:</span></span><br><span class="line">      <span class="attr">containers:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">container-7e9lc8</span></span><br><span class="line">          <span class="attr">imagePullPolicy:</span> <span class="string">Always</span></span><br><span class="line">          <span class="attr">pullSecret:</span> <span class="string">harbor</span></span><br><span class="line">          <span class="attr">image:</span> <span class="string">&#x27;IP:8088/prod/devops-trade-process&#x27;</span></span><br><span class="line">          <span class="attr">ports:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-10009</span></span><br><span class="line">              <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">              <span class="attr">containerPort:</span> <span class="number">10009</span></span><br><span class="line">              <span class="attr">servicePort:</span> <span class="number">10009</span></span><br><span class="line">          <span class="attr">volumeMounts:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/etc/localtime</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">true</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">false</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/app</span></span><br><span class="line">      <span class="attr">serviceAccount:</span> <span class="string">default</span></span><br><span class="line">      <span class="attr">affinity:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">initContainers:</span> []</span><br><span class="line">      <span class="attr">volumes:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">hostPath:</span></span><br><span class="line">            <span class="attr">path:</span> <span class="string">/etc/localtime</span></span><br><span class="line">            <span class="attr">type:</span> <span class="string">&#x27;&#x27;</span></span><br><span class="line">          <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">          <span class="attr">emptyDir:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">imagePullSecrets:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">harbor</span></span><br><span class="line">  <span class="attr">strategy:</span></span><br><span class="line">    <span class="attr">type:</span> <span class="string">RollingUpdate</span></span><br><span class="line">    <span class="attr">rollingUpdate:</span></span><br><span class="line">      <span class="attr">maxUnavailable:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line">      <span class="attr">maxSurge:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Service</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-trade-process</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">kubesphere.io/serviceType:</span> <span class="string">statelessservice</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-trade-process</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">sessionAffinity:</span> <span class="string">None</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-trade-process</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">devops-trade-process</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">ports:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-10009</span></span><br><span class="line">      <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">      <span class="attr">port:</span> <span class="number">10009</span></span><br><span class="line">      <span class="attr">targetPort:</span> <span class="number">10009</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">apps/v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Deployment</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-websocket</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-websocket-v1</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">replicas:</span> <span class="number">1</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">matchLabels:</span></span><br><span class="line">      <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app:</span> <span class="string">devops-websocket</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">devops-websocket</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">      <span class="attr">annotations:</span></span><br><span class="line">        <span class="attr">logging.kubesphere.io/logsidecar-config:</span> <span class="string">&#x27;&#123;&#125;&#x27;</span></span><br><span class="line">        <span class="attr">sidecar.istio.io/inject:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">    <span class="attr">spec:</span></span><br><span class="line">      <span class="attr">containers:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">container-1vn5nf</span></span><br><span class="line">          <span class="attr">imagePullPolicy:</span> <span class="string">Always</span></span><br><span class="line">          <span class="attr">pullSecret:</span> <span class="string">harbor</span></span><br><span class="line">          <span class="attr">image:</span> <span class="string">&#x27;IP:8088/prod/devops-websocket&#x27;</span></span><br><span class="line">          <span class="attr">ports:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-10004</span></span><br><span class="line">              <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">              <span class="attr">containerPort:</span> <span class="number">10004</span></span><br><span class="line">              <span class="attr">servicePort:</span> <span class="number">10004</span></span><br><span class="line">          <span class="attr">volumeMounts:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/etc/localtime</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">true</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">false</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/app</span></span><br><span class="line">      <span class="attr">serviceAccount:</span> <span class="string">default</span></span><br><span class="line">      <span class="attr">affinity:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">initContainers:</span> []</span><br><span class="line">      <span class="attr">volumes:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">hostPath:</span></span><br><span class="line">            <span class="attr">path:</span> <span class="string">/etc/localtime</span></span><br><span class="line">            <span class="attr">type:</span> <span class="string">&#x27;&#x27;</span></span><br><span class="line">          <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">          <span class="attr">emptyDir:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">imagePullSecrets:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">harbor</span></span><br><span class="line">  <span class="attr">strategy:</span></span><br><span class="line">    <span class="attr">type:</span> <span class="string">RollingUpdate</span></span><br><span class="line">    <span class="attr">rollingUpdate:</span></span><br><span class="line">      <span class="attr">maxUnavailable:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line">      <span class="attr">maxSurge:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Service</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-websocket</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">kubesphere.io/serviceType:</span> <span class="string">statelessservice</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-websocket</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">sessionAffinity:</span> <span class="string">None</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-websocket</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">devops-websocket</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">ports:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-10004</span></span><br><span class="line">      <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">      <span class="attr">port:</span> <span class="number">10004</span></span><br><span class="line">      <span class="attr">targetPort:</span> <span class="number">10004</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">apps/v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Deployment</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-workflow-core</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-workflow-core-v1</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">replicas:</span> <span class="number">1</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">matchLabels:</span></span><br><span class="line">      <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app:</span> <span class="string">devops-workflow-core</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">devops-workflow-core</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">      <span class="attr">annotations:</span></span><br><span class="line">        <span class="attr">logging.kubesphere.io/logsidecar-config:</span> <span class="string">&#x27;&#123;&#125;&#x27;</span></span><br><span class="line">        <span class="attr">sidecar.istio.io/inject:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">    <span class="attr">spec:</span></span><br><span class="line">      <span class="attr">containers:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">container-u985hw</span></span><br><span class="line">          <span class="attr">imagePullPolicy:</span> <span class="string">Always</span></span><br><span class="line">          <span class="attr">pullSecret:</span> <span class="string">harbor</span></span><br><span class="line">          <span class="attr">image:</span> <span class="string">&#x27;IP:8088/prod/devops-workflow-core&#x27;</span></span><br><span class="line">          <span class="attr">ports:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-10010</span></span><br><span class="line">              <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">              <span class="attr">containerPort:</span> <span class="number">10010</span></span><br><span class="line">              <span class="attr">servicePort:</span> <span class="number">10010</span></span><br><span class="line">          <span class="attr">volumeMounts:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/etc/localtime</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">true</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">false</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/app</span></span><br><span class="line">      <span class="attr">serviceAccount:</span> <span class="string">default</span></span><br><span class="line">      <span class="attr">affinity:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">initContainers:</span> []</span><br><span class="line">      <span class="attr">volumes:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">hostPath:</span></span><br><span class="line">            <span class="attr">path:</span> <span class="string">/etc/localtime</span></span><br><span class="line">            <span class="attr">type:</span> <span class="string">&#x27;&#x27;</span></span><br><span class="line">          <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">          <span class="attr">emptyDir:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">imagePullSecrets:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">harbor</span></span><br><span class="line">  <span class="attr">strategy:</span></span><br><span class="line">    <span class="attr">type:</span> <span class="string">RollingUpdate</span></span><br><span class="line">    <span class="attr">rollingUpdate:</span></span><br><span class="line">      <span class="attr">maxUnavailable:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line">      <span class="attr">maxSurge:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Service</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-workflow-core</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">kubesphere.io/serviceType:</span> <span class="string">statelessservice</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-workflow-core</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">sessionAffinity:</span> <span class="string">None</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-workflow-core</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">devops-workflow-core</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">ports:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-10010</span></span><br><span class="line">      <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">      <span class="attr">port:</span> <span class="number">10010</span></span><br><span class="line">      <span class="attr">targetPort:</span> <span class="number">10010</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">apps/v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Deployment</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-sign</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-sign-v1</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">replicas:</span> <span class="number">1</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">matchLabels:</span></span><br><span class="line">      <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app:</span> <span class="string">devops-sign</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">      <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">devops-sign</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">      <span class="attr">annotations:</span></span><br><span class="line">        <span class="attr">logging.kubesphere.io/logsidecar-config:</span> <span class="string">&#x27;&#123;&#125;&#x27;</span></span><br><span class="line">        <span class="attr">sidecar.istio.io/inject:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">    <span class="attr">spec:</span></span><br><span class="line">      <span class="attr">containers:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">container-u985hw</span></span><br><span class="line">          <span class="attr">imagePullPolicy:</span> <span class="string">Always</span></span><br><span class="line">          <span class="attr">pullSecret:</span> <span class="string">harbor</span></span><br><span class="line">          <span class="attr">image:</span> <span class="string">&#x27;IP:8088/prod/devops-sign&#x27;</span></span><br><span class="line">          <span class="attr">ports:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-10013</span></span><br><span class="line">              <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">              <span class="attr">containerPort:</span> <span class="number">10013</span></span><br><span class="line">              <span class="attr">servicePort:</span> <span class="number">10013</span></span><br><span class="line">          <span class="attr">volumeMounts:</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/etc/localtime</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">true</span></span><br><span class="line">            <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">              <span class="attr">readOnly:</span> <span class="literal">false</span></span><br><span class="line">              <span class="attr">mountPath:</span> <span class="string">/app</span></span><br><span class="line">      <span class="attr">serviceAccount:</span> <span class="string">default</span></span><br><span class="line">      <span class="attr">affinity:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">initContainers:</span> []</span><br><span class="line">      <span class="attr">volumes:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">hostPath:</span></span><br><span class="line">            <span class="attr">path:</span> <span class="string">/etc/localtime</span></span><br><span class="line">            <span class="attr">type:</span> <span class="string">&#x27;&#x27;</span></span><br><span class="line">          <span class="attr">name:</span> <span class="string">host-time</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">app</span></span><br><span class="line">          <span class="attr">emptyDir:</span> &#123;&#125;</span><br><span class="line">      <span class="attr">imagePullSecrets:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">harbor</span></span><br><span class="line">  <span class="attr">strategy:</span></span><br><span class="line">    <span class="attr">type:</span> <span class="string">RollingUpdate</span></span><br><span class="line">    <span class="attr">rollingUpdate:</span></span><br><span class="line">      <span class="attr">maxUnavailable:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line">      <span class="attr">maxSurge:</span> <span class="number">25</span><span class="string">%</span></span><br><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">apiVersion:</span> <span class="string">v1</span></span><br><span class="line"><span class="attr">kind:</span> <span class="string">Service</span></span><br><span class="line"><span class="attr">metadata:</span></span><br><span class="line">  <span class="attr">namespace:</span> <span class="string">devops-cloud</span></span><br><span class="line">  <span class="attr">labels:</span></span><br><span class="line">    <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-sign</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">annotations:</span></span><br><span class="line">    <span class="attr">kubesphere.io/serviceType:</span> <span class="string">statelessservice</span></span><br><span class="line">    <span class="attr">servicemesh.kubesphere.io/enabled:</span> <span class="string">&#x27;false&#x27;</span></span><br><span class="line">  <span class="attr">name:</span> <span class="string">devops-sign</span></span><br><span class="line"><span class="attr">spec:</span></span><br><span class="line">  <span class="attr">sessionAffinity:</span> <span class="string">None</span></span><br><span class="line">  <span class="attr">selector:</span></span><br><span class="line">    <span class="attr">app:</span> <span class="string">devops-sign</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">    <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">template:</span></span><br><span class="line">    <span class="attr">metadata:</span></span><br><span class="line">      <span class="attr">labels:</span></span><br><span class="line">        <span class="attr">version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app:</span> <span class="string">devops-sign</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/version:</span> <span class="string">v1</span></span><br><span class="line">        <span class="attr">app.kubernetes.io/name:</span> <span class="string">devops-cloud-cluster</span></span><br><span class="line">  <span class="attr">ports:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">tcp-10013</span></span><br><span class="line">      <span class="attr">protocol:</span> <span class="string">TCP</span></span><br><span class="line">      <span class="attr">port:</span> <span class="number">10013</span></span><br><span class="line">      <span class="attr">targetPort:</span> <span class="number">10013</span></span><br></pre></td></tr></table></figure>



<h2 id="九、拉通流水线"><a href="#九、拉通流水线" class="headerlink" title="九、拉通流水线"></a>九、拉通流水线</h2><h4 id="创建流水线工程-devops-cloud-auto"><a href="#创建流水线工程-devops-cloud-auto" class="headerlink" title="创建流水线工程 devops-cloud-auto"></a>创建流水线工程 devops-cloud-auto</h4><h4 id="创建所需凭证"><a href="#创建所需凭证" class="headerlink" title="创建所需凭证"></a>创建所需凭证</h4><ul>
<li>新建镜像仓库凭证</li>
</ul>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085725.png" alt="image-20220420222126737"></p>
<ul>
<li>新建kubeconfig</li>
</ul>
<p>默认生成</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085734.png" alt="image-20220420222210612"></p>
<h4 id="创建流水线"><a href="#创建流水线" class="headerlink" title="创建流水线"></a>创建流水线</h4><ul>
<li><p>代码检出</p>
</li>
<li><p>集成测试环境构建制品</p>
</li>
<li><p>清理部署</p>
</li>
<li><p>发布测试环境</p>
</li>
</ul>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085743.png" alt="image-20220421164903217"></p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085752.png" alt="image-20220420221640323"></p>
<blockquote>
<p>注意：在构建制品时项目pom文件中镜像源地址仓库名是否在harbor中有创建，没有的话，运行流水线会报错，需要自己创建仓库</p>
</blockquote>
<h4 id="可视化界面创建"><a href="#可视化界面创建" class="headerlink" title="可视化界面创建"></a>可视化界面创建</h4><ul>
<li>代理环境 maven</li>
</ul>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085810.png" alt="image-20220420221757461"></p>
<ul>
<li>代码检出</li>
</ul>
<blockquote>
<p>凭证是项目代码仓库地址</p>
</blockquote>
<ul>
<li><p>集成测试环境制品构建</p>
</li>
<li><p>清理部署</p>
</li>
</ul>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085818.png" alt="image-20220420223120319"></p>
<ul>
<li>发布测试环境</li>
</ul>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085825.png" alt="image-20220420223342778"></p>
<ul>
<li>运行部署</li>
</ul>
<p>失败，点击活动，查看日志。分析报错</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085831.png" alt="image-20220420223815150"></p>
<p>成功，等启动完，查看服务下所有容器的的日志，是否启动完成无报错</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085837.png" alt="image-20220420224253239"></p>
<h4 id="配置文件形式构建"><a href="#配置文件形式构建" class="headerlink" title="配置文件形式构建"></a>配置文件形式构建</h4><p><strong>注意</strong></p>
<blockquote>
<ul>
<li><p>environment环境变量需要调整</p>
</li>
<li><p>凭证需要调整</p>
</li>
</ul>
</blockquote>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br></pre></td><td class="code"><pre><span class="line">pipeline &#123;</span><br><span class="line">  agent &#123;</span><br><span class="line">    node &#123;</span><br><span class="line">      label &#x27;maven&#x27;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">  &#125;</span><br><span class="line">  stages &#123;</span><br><span class="line">    stage(&#x27;代码检出&#x27;) &#123;</span><br><span class="line">      agent none</span><br><span class="line">      steps &#123;</span><br><span class="line">        git(branch: &#x27;dev-yanCheng20220512&#x27;, url: &#x27;http://IP/devops-studio/devops-cloud.git&#x27;, credentialsId: &#x27;github-id&#x27;, changelog: true, poll: false)</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    stage(&#x27;集成测试环境制品构建&#x27;) &#123;</span><br><span class="line">      agent none</span><br><span class="line">      steps &#123;</span><br><span class="line">        container(&#x27;maven&#x27;) &#123;</span><br><span class="line">          withCredentials([usernamePassword(credentialsId : &#x27;dockerhub-id&#x27; ,passwordVariable : &#x27;DOCKER_PASSWORD&#x27; ,usernameVariable : &#x27;DOCKER_USERNAME&#x27; ,)]) &#123;</span><br><span class="line">            sh &#x27;echo &quot;$DOCKER_PASSWORD&quot; | docker login $REGISTRY -u &quot;$DOCKER_USERNAME&quot; --password-stdin&#x27;</span><br><span class="line">          &#125;</span><br><span class="line"></span><br><span class="line">          sh &#x27;mvn clean package  -P test5 -T 1C -Dmaven.test.skip=true  -Dmaven.compile.fork=true dockerfile:build dockerfile:push&#x27;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">      &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    stage(&#x27;清理部署&#x27;) &#123;</span><br><span class="line">      agent none</span><br><span class="line">      steps &#123;</span><br><span class="line">        kubernetesDeploy(enableConfigSubstitution: true, deleteResource: true, kubeconfigId: &#x27;kubeconfig-id&#x27;, configs: &#x27;test5/**&#x27;)</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    stage(&#x27;发布测试环境&#x27;) &#123;</span><br><span class="line">      agent none</span><br><span class="line">      steps &#123;</span><br><span class="line">        container(&#x27;maven&#x27;) &#123;</span><br><span class="line">          withCredentials([</span><br><span class="line">                                                                                                                                                  kubeconfigFile(</span><br><span class="line">                                                                                                                                                                          credentialsId: env.KUBECONFIG_CREDENTIAL_ID,</span><br><span class="line">                                                                                                                                                                          variable: &#x27;KUBECONFIG&#x27;)</span><br><span class="line">                                                                                                                                                                          ]) &#123;</span><br><span class="line">                sh &#x27;envsubst &lt; test5/deployment-aggregate.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                sh &#x27;envsubst &lt; test5/deployment-bank.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                sh &#x27;envsubst &lt; test5/deployment-file.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                sh &#x27;envsubst &lt; test5/deployment-gateway.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                sh &#x27;envsubst &lt; test5/deployment-main.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                sh &#x27;envsubst &lt; test5/deployment-object.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                sh &#x27;envsubst &lt; test5/deployment-process.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                sh &#x27;envsubst &lt; test5/deployment-system.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                sh &#x27;envsubst &lt; test5/deployment-websocket.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                sh &#x27;envsubst &lt; test5/deployment-workflow.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                sh &#x27;envsubst &lt; test5/deployment-analysis.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                sh &#x27;envsubst &lt; test5/deployment-sign.yaml | kubectl apply -f -&#x27;</span><br><span class="line">                sh &#x27;envsubst &lt; test5/deployment-message.yaml | kubectl apply -f -&#x27;</span><br><span class="line">              &#125;</span><br><span class="line"></span><br><span class="line">            &#125;</span><br><span class="line"></span><br><span class="line">          &#125;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">      &#125;</span><br><span class="line">      environment &#123;</span><br><span class="line">        DOCKER_CREDENTIAL_ID = &#x27;dockerhub-id&#x27;</span><br><span class="line">        KUBECONFIG_CREDENTIAL_ID = &#x27;kubeconfig-id&#x27;</span><br><span class="line">        REGISTRY = &#x27;IP:8088&#x27;</span><br><span class="line">      &#125;</span><br><span class="line">    &#125;</span><br></pre></td></tr></table></figure>









<h2 id="十、扩展"><a href="#十、扩展" class="headerlink" title="十、扩展"></a>十、扩展</h2><h3 id="kubeshpere添加新节点"><a href="#kubeshpere添加新节点" class="headerlink" title="*kubeshpere添加新节点"></a>*kubeshpere添加新节点</h3><p>1、主节点上修改kk配置文件，加入新节点node2配置</p>
<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085847.png" alt="image-20220531171121778"></p>
<p>2、执行添加命令</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">./kk add nodes -f 配置文件</span><br><span class="line">./kk add nodes -f sample.yaml</span><br></pre></td></tr></table></figure>

<p>3、查看节点</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">kubectl get node</span><br></pre></td></tr></table></figure>

<h3 id="删除节点"><a href="#删除节点" class="headerlink" title="*删除节点"></a>*删除节点</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">./kk delete node &lt;nodeName&gt; -f config-sample.yaml</span><br></pre></td></tr></table></figure>

<h3 id="指定pod运行在固定ip上"><a href="#指定pod运行在固定ip上" class="headerlink" title="*指定pod运行在固定ip上"></a>*指定pod运行在固定ip上</h3><p>标签选择器</p>
<p>1、打标签</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line">#查看当前node</span><br><span class="line">$ kubectl get node -o wide</span><br><span class="line"></span><br><span class="line">NAME                STATUS   ROLES                  AGE   VERSION   INTERNAL-IP     EXTERNAL-IP   OS-IMAGE         KERNEL-VERSION                 CONTAINER-RUNTIME</span><br><span class="line">k8s-elasticsearch   Ready    &lt;none&gt;                 16h   v1.21.0   172.16.66.167   &lt;none&gt;        CentOS Linux 8   4.18.0-305.19.1.el8_4.x86_64   docker://20.10.9</span><br><span class="line">k8s-master          Ready    control-plane,master   43h   v1.21.0   172.16.66.169   &lt;none&gt;        CentOS Linux 8   4.18.0-305.19.1.el8_4.x86_64   docker://20.10.9</span><br><span class="line">k8s-node1           Ready    &lt;none&gt;                 43h   v1.21.0   172.16.66.168   &lt;none&gt;        CentOS Linux 8   4.18.0-305.19.1.el8_4.x86_64   docker://20.10.9</span><br><span class="line">k8s-node2           Ready    &lt;none&gt;                 43h   v1.21.0   172.16.66.170   &lt;none&gt;        CentOS Linux 8   4.18.0-305.19.1.el8_4.x86_64   docker://20.10.9</span><br><span class="line"></span><br><span class="line">#给k8s-node1 k8s-node2打上标签sign</span><br><span class="line">$ kubectl label nodes k8s-node1 k8s-node2 type=sign</span><br><span class="line"></span><br><span class="line">#查看type=websvr标签的node</span><br><span class="line">$ kubectl get node -l type=websvr</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">NAME        STATUS   ROLES    AGE   VERSION</span><br><span class="line">k8s-node1   Ready    &lt;none&gt;   43h   v1.21.0</span><br><span class="line">k8s-node2   Ready    &lt;none&gt;   43h   v1.21.0</span><br><span class="line"></span><br><span class="line">#以下附带标签的其他操作：</span><br><span class="line">#修改标签</span><br><span class="line">$ kubectl label nodes k8s-node1 k8s-node2 type=webtest --overwrite</span><br><span class="line"></span><br><span class="line">#查看node标签</span><br><span class="line">$ kubectl get nodes k8s-node1 k8s-node2 --show-labels</span><br><span class="line"></span><br><span class="line">#删除标签</span><br><span class="line">$ kubectl label nodes k8s-node1 k8s-node2 type-</span><br></pre></td></tr></table></figure>



<p>2、插入选择器</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line">apiVersion: apps/v1</span><br><span class="line">kind: Deployment</span><br><span class="line">metadata:</span><br><span class="line">  name: websvr1-deployment</span><br><span class="line">spec:</span><br><span class="line">  selector:</span><br><span class="line">    matchLabels:</span><br><span class="line">      app: websvr1</span><br><span class="line">  replicas: 3</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      labels:</span><br><span class="line">        app: websvr1</span><br><span class="line">    spec:</span><br><span class="line">      nodeSelector:                 #选择标签为type:websvr的node部署</span><br><span class="line">        type: websvr</span><br><span class="line">      containers:</span><br><span class="line">      - name: websvr1</span><br><span class="line">        image: websvr:v1</span><br><span class="line">        ports:</span><br><span class="line">        - containerPort: 3000</span><br></pre></td></tr></table></figure>

<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085855.png" alt="image-20220630095812994"></p>
<p><strong>扩展（固定在节点上）</strong></p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">nodeSelector:</span><br><span class="line">  kubernetes.io/hostname: node187</span><br></pre></td></tr></table></figure>

<p>集群中的每个节点默认已经附带了多个标签，如kubernetes.io&#x2F;hostname、 beta.kubernetes.io&#x2F;os 和beta.kubernetes.io&#x2F;arch 等。这些标签也可以直接由nodeSelector使用，尤其是希望将Pod调度至某特定节点时，可以使用kubernetes.io&#x2F;hostname 直接绑定至相应的主机即可。不过，这种绑定至特定主机的需求还有一种更为简单的实现方式，即使用spec.nodeName字段直接指定目标节点。</p>
<h3 id="数据挂载"><a href="#数据挂载" class="headerlink" title="*数据挂载"></a>*数据挂载</h3><p>kubesphere的存储卷是属于分布式存储，不用关心存储底层做了啥。但我们需要将数据存在当前服务器的文件目录下，可使用volume配置形式挂载</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">#直白的说, 就是挂载在磁盘上.</span><br><span class="line">apiVersion: v1</span><br><span class="line">kind: Pod</span><br><span class="line">spec: </span><br><span class="line">  containers: </span><br><span class="line">    - name: test</span><br><span class="line">      image: nginx</span><br><span class="line">      # 定义进行挂载的数据卷</span><br><span class="line">      volumeMounts:</span><br><span class="line">        - name: config-volume</span><br><span class="line">          mountPath: /etc/config</span><br><span class="line">  volumes: </span><br><span class="line">    - name: config-volume</span><br><span class="line">      hostPath: </span><br><span class="line">        path: /usr/etc/nginx/config</span><br></pre></td></tr></table></figure>

<p>上面将（服务器宿主机）本地的目录 <code>/usr/etc/nginx/config</code> 挂在到的容器的 <code>/etc/config</code> 上.</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br></pre></td><td class="code"><pre><span class="line">kind: Deployment</span><br><span class="line">apiVersion: apps/v1</span><br><span class="line">metadata:</span><br><span class="line">  name: devops-file-v1</span><br><span class="line">  namespace: devops</span><br><span class="line">  labels:</span><br><span class="line">    app: devops-file</span><br><span class="line">    app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">    app.kubernetes.io/version: v1</span><br><span class="line">    version: v1</span><br><span class="line">  annotations:</span><br><span class="line">    deployment.kubernetes.io/revision: &#x27;34&#x27;</span><br><span class="line">    kubesphere.io/creator: admin</span><br><span class="line">    servicemesh.kubesphere.io/enabled: &#x27;false&#x27;</span><br><span class="line">spec:</span><br><span class="line">  replicas: 2</span><br><span class="line">  selector:</span><br><span class="line">    matchLabels:</span><br><span class="line">      app: devops-file</span><br><span class="line">      app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">      app.kubernetes.io/version: v1</span><br><span class="line">      version: v1</span><br><span class="line">  template:</span><br><span class="line">    metadata:</span><br><span class="line">      creationTimestamp: null</span><br><span class="line">      labels:</span><br><span class="line">        app: devops-file</span><br><span class="line">        app.kubernetes.io/name: devops-cloud-cluster</span><br><span class="line">        app.kubernetes.io/version: v1</span><br><span class="line">        version: v1</span><br><span class="line">      annotations:</span><br><span class="line">        kubesphere.io/restartedAt: &#x27;2022-10-31T03:18:27.126Z&#x27;</span><br><span class="line">        logging.kubesphere.io/logsidecar-config: &#x27;&#123;&#125;&#x27;</span><br><span class="line">        sidecar.istio.io/inject: &#x27;false&#x27;</span><br><span class="line">    spec:</span><br><span class="line">      volumes:</span><br><span class="line">        - name: host-time</span><br><span class="line">          hostPath:</span><br><span class="line">            path: /etc/localtime</span><br><span class="line">            type: &#x27;&#x27;</span><br><span class="line">        - name: app</span><br><span class="line">          emptyDir: &#123;&#125;</span><br><span class="line">        - name: filedata</span><br><span class="line">          hostPath:</span><br><span class="line">            path: /home/filedata</span><br><span class="line">            type: &#x27;&#x27;</span><br><span class="line">      containers:</span><br><span class="line">        - name: container-5qxqpy</span><br><span class="line">          image: &#x27;10.84.x.x:8088/prod/devops-file&#x27;</span><br><span class="line">          ports:</span><br><span class="line">            - name: tcp-10002</span><br><span class="line">              containerPort: 10002</span><br><span class="line">              protocol: TCP</span><br><span class="line">          env:</span><br><span class="line">            - name: JVM</span><br><span class="line">              value: &#x27;-Xms2g -Xmx2g&#x27;</span><br><span class="line">            - name: BOOTSTRAP_SERVER</span><br><span class="line">              value: &#x27;10.84.x.x:9092,10.84.x.x:9092,10.84.x.x:9092&#x27;</span><br><span class="line">          resources: &#123;&#125;</span><br><span class="line">          volumeMounts:</span><br><span class="line">            - name: host-time</span><br><span class="line">              readOnly: true</span><br><span class="line">              mountPath: /etc/localtime</span><br><span class="line">            - name: app</span><br><span class="line">              mountPath: /app</span><br><span class="line">            - name: filedata</span><br><span class="line">              mountPath: /home/filedata</span><br><span class="line">          terminationMessagePath: /dev/termination-log</span><br><span class="line">          terminationMessagePolicy: File</span><br><span class="line">          imagePullPolicy: Always</span><br><span class="line">      restartPolicy: Always</span><br><span class="line">      terminationGracePeriodSeconds: 30</span><br><span class="line">      dnsPolicy: ClusterFirst</span><br><span class="line">      nodeSelector:</span><br><span class="line">        type: file</span><br><span class="line">      serviceAccountName: default</span><br><span class="line">      serviceAccount: default</span><br><span class="line">      securityContext: &#123;&#125;</span><br><span class="line">      imagePullSecrets:</span><br><span class="line">        - name: harbor</span><br><span class="line">      affinity: &#123;&#125;</span><br><span class="line">      schedulerName: default-scheduler</span><br><span class="line">  strategy:</span><br><span class="line">    type: RollingUpdate</span><br><span class="line">    rollingUpdate:</span><br><span class="line">      maxUnavailable: 25%</span><br><span class="line">      maxSurge: 25%</span><br><span class="line">  revisionHistoryLimit: 10</span><br><span class="line">  progressDeadlineSeconds: 600</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h3 id="允许访问网络"><a href="#允许访问网络" class="headerlink" title="*允许访问网络"></a>*允许访问网络</h3><p>移动网络</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">dnsConfig:</span><br><span class="line">  nameservers:</span><br><span class="line">    - 114.114.114.114</span><br><span class="line">  options:</span><br><span class="line">    - name: ndots</span><br><span class="line">      value: &#x27;2&#x27;</span><br><span class="line">    - name: edns0</span><br></pre></td></tr></table></figure>

<p><img src="http://img.lindaifeng.vip/typora-picgo-tuchaung/20221107085904.png" alt="image-20220630095724658"></p>
<h2 id="十一、常见问题"><a href="#十一、常见问题" class="headerlink" title="十一、常见问题"></a>十一、常见问题</h2><h3 id="https参数未设置-The-protocol-is-https-but-attribute-ssl-cert-is-not-set"><a href="#https参数未设置-The-protocol-is-https-but-attribute-ssl-cert-is-not-set" class="headerlink" title="https参数未设置( The protocol is https but attribute ssl_cert is not set)"></a>https参数未设置( The protocol is https but attribute ssl_cert is not set)</h3><blockquote>
<p>原因分析：顾名思义，一看就知道，https参数未设置，而本就不需要用https</p>
<p>解决方案：配置文件中的https注释掉，注释掉即可</p>
</blockquote>
<h3 id="启动harbor报-Failed-to-Setup-IP-tables-Unable-to-enable-SKIP-DNAT-rule）"><a href="#启动harbor报-Failed-to-Setup-IP-tables-Unable-to-enable-SKIP-DNAT-rule）" class="headerlink" title="启动harbor报( Failed to Setup IP tables: Unable to enable SKIP DNAT rule）"></a>启动harbor报( Failed to Setup IP tables: Unable to enable SKIP DNAT rule）</h3><blockquote>
<p>原因分析：之前关闭防火墙之后docker没有重启，</p>
<p>解决方案：执行以下命令重启docker即可</p>
<p>service docker restart</p>
</blockquote>
<h3 id="连接私服报-http-server-gave-HTTP-response-to-HTTPS-client"><a href="#连接私服报-http-server-gave-HTTP-response-to-HTTPS-client" class="headerlink" title="连接私服报(http: server gave HTTP response to HTTPS client)"></a>连接私服报(http: server gave HTTP response to HTTPS client)</h3><blockquote>
<p>原因分析：Docker Registry 交互默认使用的是 HTTPS，但是搭建私有镜像默认使用的是 HTTP 服务，所以与私有镜像交互时出现以下错误。</p>
<p>解决方案：docker系统服务添加安全进程</p>
</blockquote>
<p>vi &#x2F;etc&#x2F;docker&#x2F;daemon.json填入<code>insecure-registries</code>：</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">  <span class="attr">&quot;registry-mirrors&quot;:</span> [</span><br><span class="line">    <span class="string">&quot;https://sq9p56f6.mirror.aliyuncs.com&quot;</span></span><br><span class="line">  ],</span><br><span class="line">  <span class="attr">&quot;insecure-registries&quot;:</span> [<span class="string">&quot;192.168.x.x:8088&quot;</span>],</span><br><span class="line">  <span class="string">&quot;exec-opts&quot;</span><span class="string">:</span>[<span class="string">&quot;native.cgroupdriver=systemd&quot;</span>]</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>



<h3 id="docker磁盘空间不足（ERROR：cannot-create-temporary-directory）（fatal-error-runtime-out-of-memory）"><a href="#docker磁盘空间不足（ERROR：cannot-create-temporary-directory）（fatal-error-runtime-out-of-memory）" class="headerlink" title="docker磁盘空间不足（ERROR：cannot  create temporary directory）（fatal error: runtime: out of memory）"></a>docker磁盘空间不足（ERROR：cannot  create temporary directory）（fatal error: runtime: out of memory）</h3><blockquote>
<p>原因分析：通过<code>du -h --max-depth=1 /</code> 逐级目录排查，发现&#x2F;var&#x2F;lib&#x2F;docker目录文件过大</p>
<p>解决方案：转移数据修改docker默认存储位置 或者 搞一个外部存储</p>
</blockquote>
<p>（1）转移数据修改docker默认存储位置</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#停止docker服务</span></span><br><span class="line">systemctl stop docker</span><br><span class="line"><span class="comment">#创建新的docker目录，执行命令df -h,找一个大的磁盘</span></span><br><span class="line"> <span class="built_in">mkdir</span> -p /app/docker/lib</span><br><span class="line"><span class="comment">#迁移/var/lib/docker目录下面的文件到/app/docker/lib</span></span><br><span class="line">rsync -avz /var/lib/docker/ /app/docker/lib/</span><br><span class="line"><span class="comment">#配置 /usr/lib/systemd/system/docker.service</span></span><br><span class="line">vi /usr/lib/systemd/system/docker.service</span><br><span class="line"><span class="comment">#重启docker</span></span><br><span class="line">systemctl daemon-reload</span><br><span class="line">systemctl restart docker</span><br><span class="line">systemctl <span class="built_in">enable</span> docker</span><br></pre></td></tr></table></figure>

<p>（2）确认Docker Root Dir修改是否已经生效</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">[root@node24 docker]<span class="comment"># docker info</span></span><br><span class="line">...</span><br><span class="line">Docker Root Dir: /app/docker/lib/docker</span><br><span class="line">Debug Mode (client): <span class="literal">false</span></span><br><span class="line">Debug Mode (server): <span class="literal">false</span></span><br><span class="line">Registry: https://index.docker.io/v1/</span><br><span class="line">...</span><br></pre></td></tr></table></figure>

<p>（3）确认之前的镜像是否还在</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">[root@master24 kk]<span class="comment"># docker images</span></span><br><span class="line">REPOSITORY                                                                TAG                            IMAGE ID            CREATED             SIZE</span><br><span class="line">perl                                                                      latest                         f9596eddf06f        5 months ago        890MB</span><br><span class="line">hello-world                                                               latest                         feb5d9fea6a5        8 months ago        13.3kB</span><br><span class="line">192.168.x.x:8088/library/nginxdemos/hello                              plain-text                     21dd11c8fb7a        8 months ago        22.9MB</span><br><span class="line">nginxdemos/hello                                                          plain-text                     21dd11c8fb7a        8 months ago        22.9MB</span><br><span class="line">192.168.x.x:8088/library/kubesphere/edge-watcher                       v0.1.0                         f3c1c017ccd5        8 months ago        47.8MB</span><br><span class="line">kubesphere/edge-watcher                                                   v0.1.0                         f3c1c017ccd5        8 months ago        47.8MB</span><br></pre></td></tr></table></figure>

<p>（4） 确定容器没问题后删除&#x2F;var&#x2F;lib&#x2F;docker&#x2F;目录中的文件</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">rm</span> -rf /var/lib/docker</span><br></pre></td></tr></table></figure>



<h3 id="镜像不存在-No-such-image-perl-latest"><a href="#镜像不存在-No-such-image-perl-latest" class="headerlink" title="镜像不存在(No such image: perl:latest)"></a>镜像不存在(No such image: perl:latest)</h3><blockquote>
<p>docker里没有该镜像，pull一个然后给个标记推送至私服即可</p>
</blockquote>
<h3 id="连接超过重试次数-connection-reset-by-peer-See-‘docker-run-–help’"><a href="#连接超过重试次数-connection-reset-by-peer-See-‘docker-run-–help’" class="headerlink" title="连接超过重试次数(connection reset by peer. See ‘docker run –help’.)"></a>连接超过重试次数(connection reset by peer. See ‘docker run –help’.)</h3><p>（1）情况一</p>
<blockquote>
<p>docker默认的源为国外官方源，下载速度较慢，改成国内镜像源</p>
</blockquote>
<p>vi &#x2F;etc&#x2F;docker&#x2F;daemon.json填入<code>registry-mirrors</code>：</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">  <span class="attr">&quot;registry-mirrors&quot;:</span> [</span><br><span class="line">    <span class="string">&quot;https://sq9p56f6.mirror.aliyuncs.com&quot;</span>  <span class="comment">#这是我自个阿里云的镜像加速器，你可去阿里弄个自己的</span></span><br><span class="line">  ],</span><br><span class="line">  <span class="attr">&quot;insecure-registries&quot;:</span> [<span class="string">&quot;192.168.x.x:8088&quot;</span>],</span><br><span class="line">  <span class="string">&quot;exec-opts&quot;</span><span class="string">:</span>[<span class="string">&quot;native.cgroupdriver=systemd&quot;</span>]</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>（2）情况二</p>
<blockquote>
<p>harbor出问题了，导致私服连接不上</p>
</blockquote>
<p>（3）情况三</p>
<blockquote>
<p>config-sample.yaml中配置的私服有问题，导致找不到对应的镜像</p>
</blockquote>

      
    </div>
    <footer class="article-footer">
      
        <div id="donation_div"></div>


<script src="/qingfeng-blog/js/vdonate.js"></script>

<script>
var a = new Donate({
  title: '如果觉得我的文章对您有用，请随意打赏。您的支持将鼓励我继续创作!', // 可选参数，打赏标题
  btnText: 'Donate', // 可选参数，打赏按钮文字
  el: document.getElementById('donation_div'),
  wechatImage: 'http://img.lindaifeng.vip/typora-picgo-tuchaung/20230428150832.png',
  alipayImage: 'http://img.lindaifeng.vip/typora-picgo-tuchaung/20230428150823.png'
});
</script>
      
      
      <div>
        <ul class="post-copyright">
          <li class="post-copyright-author">
          <strong>Post author:  </strong>清峰</a>
          </li>
          <li class="post-copyright-link">
          <strong>Post link:  </strong>
          <a href="/qingfeng-blog/2022/05/26/运维安装/Linux k8s在线｜离线部署/" target="_blank" title="Linux k8s在线｜离线部署">http://example.com/2022/05/26/运维安装/Linux k8s在线｜离线部署/</a>
          </li>
          <li class="post-copyright-license">
            <strong>Copyright Notice:   </strong>
            All articles in this blog are licensed under <a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">CC BY-NC-ND 4.0</a>
            unless stating additionally.
          </li>
         
        </ul>
<div>

      
      
        
	<div id="comment">
		<!-- 来必力City版安装代码 -->
		<div id="lv-container" data-id="city" data-uid="MTAyMC8yOTQ4MS82MDQ5">
		<script type="text/javascript">
		   (function(d, s) {
		       var j, e = d.getElementsByTagName(s)[0];

		       if (typeof LivereTower === 'function') { return; }

		       j = d.createElement(s);
		       j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
		       j.async = true;

		       e.parentNode.insertBefore(j, e);
		   })(document, 'script');
		</script>
		<noscript>为正常使用来必力评论功能请激活JavaScript</noscript>
		</div>
		<!-- City版安装代码已完成 -->
	</div>



      
      
        
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/qingfeng-blog/tags/k8s/" rel="tag">k8s</a></li></ul>

      

    </footer>
  </div>
</div>
  
    
<nav id="article-nav">
  
    <a href="/qingfeng-blog/2022/05/26/%E8%BF%90%E7%BB%B4%E5%AE%89%E8%A3%85/Linux%20%E5%AE%89%E8%A3%85docker/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          Linux 安装docker
        
      </div>
    </a>
  
  
    <a href="/qingfeng-blog/2022/04/20/%E8%BF%90%E7%BB%B4%E5%AE%89%E8%A3%85/Linux%20kubesphere%E5%9C%A8%E7%BA%BF%E5%85%A8%E6%B5%81%E7%A8%8B%E6%90%AD%E5%BB%BA/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">Linux kubesphere在线全流程搭建</div>
    </a>
  
</nav>

  
</article>

<!-- Table of Contents -->

  <aside id="toc-sidebar">
    <div id="toc" class="toc-article">
    <strong class="toc-title">Contents</strong>
    
        <ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%B8%80%E3%80%81%E5%AE%89%E8%A3%85%E5%89%8D%E9%A1%BB%E7%9F%A5"><span class="nav-number">1.</span> <span class="nav-text">一、安装前须知</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%89%8D%E6%8F%90%E7%8E%AF%E5%A2%83"><span class="nav-number">1.1.</span> <span class="nav-text">前提环境</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BA%8C%E3%80%81%E5%9C%A8%E7%BA%BF%E5%AE%89%E8%A3%85Docker"><span class="nav-number">2.</span> <span class="nav-text">二、在线安装Docker</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E9%85%8D%E7%BD%AE%E7%9B%B8%E5%85%B3yum%E6%BA%90"><span class="nav-number">2.1.</span> <span class="nav-text">配置相关yum源</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%AE%89%E8%A3%85docker"><span class="nav-number">2.2.</span> <span class="nav-text">安装docker</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%90%AF%E5%8A%A8docker"><span class="nav-number">2.3.</span> <span class="nav-text">启动docker</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E9%85%8D%E7%BD%AE%E5%8A%A0%E9%80%9F"><span class="nav-number">2.4.</span> <span class="nav-text">配置加速</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%B8%89%E3%80%81%E7%A6%BB%E7%BA%BF%E5%AE%89%E8%A3%85Docker"><span class="nav-number">3.</span> <span class="nav-text">三、离线安装Docker</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%8B%E8%BD%BD%E5%AE%89%E8%A3%85%E5%8C%85"><span class="nav-number">3.1.</span> <span class="nav-text">下载安装包</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E8%A7%A3%E5%8E%8B%E7%BC%A9"><span class="nav-number">3.2.</span> <span class="nav-text">解压缩</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E7%A7%BB%E5%8A%A8%E6%96%87%E4%BB%B6"><span class="nav-number">3.3.</span> <span class="nav-text">移动文件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%B0%86Docker%E6%B3%A8%E5%86%8C%E4%B8%BA%E7%B3%BB%E7%BB%9F%E6%9C%8D%E5%8A%A1"><span class="nav-number">3.4.</span> <span class="nav-text">将Docker注册为系统服务</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E9%85%8D%E7%BD%AEdcker%E4%BB%93%E5%BA%93%E8%B7%AF%E5%BE%84"><span class="nav-number">3.5.</span> <span class="nav-text">配置dcker仓库路径</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%9B%9B%E3%80%81%E7%A6%BB%E7%BA%BF%E5%AE%89%E8%A3%85Docker-compose"><span class="nav-number">4.</span> <span class="nav-text">四、离线安装Docker-compose</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%8B%E8%BD%BD%E5%AE%89%E8%A3%85%E5%8C%85-1"><span class="nav-number">4.1.</span> <span class="nav-text">下载安装包</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E9%85%8D%E7%BD%AE"><span class="nav-number">4.2.</span> <span class="nav-text">配置</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BA%94%E3%80%81%E5%AE%89%E8%A3%85harbor%EF%BC%88%E5%9C%A8%E7%BA%BF%EF%BD%9C%E7%A6%BB%E7%BA%BF%EF%BC%89"><span class="nav-number">5.</span> <span class="nav-text">五、安装harbor（在线｜离线）</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1%E3%80%81%E4%B8%8B%E8%BD%BD%E5%AE%89%E8%A3%85%E5%8C%85%E6%8B%B7%E8%B4%9D%E5%88%B0linux%E4%B8%AD"><span class="nav-number">5.1.</span> <span class="nav-text">1、下载安装包拷贝到linux中</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2%E3%80%81%E4%BF%AE%E6%94%B9%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6"><span class="nav-number">5.2.</span> <span class="nav-text">2、修改配置文件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3%E3%80%81%E6%89%A7%E8%A1%8C%E5%AE%89%E8%A3%85%E8%84%9A%E6%9C%AC"><span class="nav-number">5.3.</span> <span class="nav-text">3、执行安装脚本</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4%E3%80%81%E6%9F%A5%E7%9C%8B%E9%95%9C%E5%83%8F"><span class="nav-number">5.4.</span> <span class="nav-text">4、查看镜像</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#5%E3%80%81%E8%AE%BF%E9%97%AEharbor"><span class="nav-number">5.5.</span> <span class="nav-text">5、访问harbor</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%85%AD%E3%80%81Kubesphere%E5%8F%8Ak8s%E5%AE%89%E8%A3%85"><span class="nav-number">6.</span> <span class="nav-text">六、Kubesphere及k8s安装</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%9C%A8%E7%BA%BF%E5%AE%89%E8%A3%85"><span class="nav-number">6.1.</span> <span class="nav-text">在线安装</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1%E3%80%81%E4%B8%8B%E8%BD%BD%E5%AE%89%E8%A3%85%E8%84%9A%E6%9C%AC"><span class="nav-number">6.1.1.</span> <span class="nav-text">1、下载安装脚本</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2%E3%80%81%E5%AE%89%E8%A3%85%E5%A4%B1%E8%B4%A5%E5%9B%9E%E6%BB%9A"><span class="nav-number">6.1.2.</span> <span class="nav-text">2、安装失败回滚</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E7%A6%BB%E7%BA%BF%E5%AE%89%E8%A3%85"><span class="nav-number">6.2.</span> <span class="nav-text">离线安装</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1%E3%80%81%E5%AE%89%E8%A3%85k8s%E6%8F%92%E4%BB%B6"><span class="nav-number">6.2.1.</span> <span class="nav-text">1、安装k8s插件</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2%E3%80%81%E5%AE%89%E8%A3%85k8s"><span class="nav-number">6.2.2.</span> <span class="nav-text">2、安装k8s</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3%E3%80%81%E5%AE%89%E8%A3%85%E5%A4%B1%E8%B4%A5%E5%9B%9E%E6%BB%9A"><span class="nav-number">6.2.3.</span> <span class="nav-text">3、安装失败回滚</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%B8%83%E3%80%81%E7%A6%BB%E7%BA%BF%E5%AE%89%E8%A3%85%E4%B8%AD%E9%97%B4%E4%BB%B6%E4%B8%8E%E9%A1%B9%E7%9B%AE"><span class="nav-number">7.</span> <span class="nav-text">七、离线安装中间件与项目</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1%E3%80%81sql%E6%96%87%E4%BB%B6%E5%AF%BC%E5%85%A5"><span class="nav-number">7.1.</span> <span class="nav-text">1、sql文件导入</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2%E3%80%81java8%E3%80%81nacos%E3%80%81xxl-job%E3%80%81pdf%E9%95%9C%E5%83%8F%E6%89%93%E5%8C%85"><span class="nav-number">7.2.</span> <span class="nav-text">2、java8、nacos、xxl-job、pdf镜像打包</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3%E3%80%81%E5%88%9B%E5%BB%BAharbor%E4%BB%93%E5%BA%93%E5%90%8D"><span class="nav-number">7.3.</span> <span class="nav-text">3、创建harbor仓库名</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4%E3%80%81docker%E5%90%AF%E5%8A%A8nacos"><span class="nav-number">7.4.</span> <span class="nav-text">4、docker启动nacos</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#5%E3%80%81docker%E5%90%AF%E5%8A%A8xxl-job"><span class="nav-number">7.5.</span> <span class="nav-text">5、docker启动xxl-job</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#6%E3%80%81%E9%A1%B9%E7%9B%AE%E6%96%87%E4%BB%B6%E6%89%93%E5%8C%85"><span class="nav-number">7.6.</span> <span class="nav-text">6、项目文件打包</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#7%E3%80%81%E6%89%93%E5%8C%85%E4%B8%8A%E4%BC%A0"><span class="nav-number">7.7.</span> <span class="nav-text">7、打包上传</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%85%AB%E3%80%81Kubesphere%E8%87%AA%E5%88%B6%E5%BA%94%E7%94%A8%EF%BC%88yaml%E5%BD%A2%E5%BC%8F%EF%BC%89"><span class="nav-number">8.</span> <span class="nav-text">八、Kubesphere自制应用（yaml形式）</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#%EF%BC%881%EF%BC%89nacos"><span class="nav-number">8.0.1.</span> <span class="nav-text">（1）nacos</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%EF%BC%882%EF%BC%89xxl-job"><span class="nav-number">8.0.2.</span> <span class="nav-text">（2）xxl-job</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%EF%BC%883%EF%BC%89devops-cloud-cluster"><span class="nav-number">8.0.3.</span> <span class="nav-text">（3）devops-cloud-cluster</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%B9%9D%E3%80%81%E6%8B%89%E9%80%9A%E6%B5%81%E6%B0%B4%E7%BA%BF"><span class="nav-number">9.</span> <span class="nav-text">九、拉通流水线</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#%E5%88%9B%E5%BB%BA%E6%B5%81%E6%B0%B4%E7%BA%BF%E5%B7%A5%E7%A8%8B-devops-cloud-auto"><span class="nav-number">9.0.1.</span> <span class="nav-text">创建流水线工程 devops-cloud-auto</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E5%88%9B%E5%BB%BA%E6%89%80%E9%9C%80%E5%87%AD%E8%AF%81"><span class="nav-number">9.0.2.</span> <span class="nav-text">创建所需凭证</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E5%88%9B%E5%BB%BA%E6%B5%81%E6%B0%B4%E7%BA%BF"><span class="nav-number">9.0.3.</span> <span class="nav-text">创建流水线</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E5%8F%AF%E8%A7%86%E5%8C%96%E7%95%8C%E9%9D%A2%E5%88%9B%E5%BB%BA"><span class="nav-number">9.0.4.</span> <span class="nav-text">可视化界面创建</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E5%BD%A2%E5%BC%8F%E6%9E%84%E5%BB%BA"><span class="nav-number">9.0.5.</span> <span class="nav-text">配置文件形式构建</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%8D%81%E3%80%81%E6%89%A9%E5%B1%95"><span class="nav-number">10.</span> <span class="nav-text">十、扩展</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#kubeshpere%E6%B7%BB%E5%8A%A0%E6%96%B0%E8%8A%82%E7%82%B9"><span class="nav-number">10.1.</span> <span class="nav-text">*kubeshpere添加新节点</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%88%A0%E9%99%A4%E8%8A%82%E7%82%B9"><span class="nav-number">10.2.</span> <span class="nav-text">*删除节点</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E6%8C%87%E5%AE%9Apod%E8%BF%90%E8%A1%8C%E5%9C%A8%E5%9B%BA%E5%AE%9Aip%E4%B8%8A"><span class="nav-number">10.3.</span> <span class="nav-text">*指定pod运行在固定ip上</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E6%95%B0%E6%8D%AE%E6%8C%82%E8%BD%BD"><span class="nav-number">10.4.</span> <span class="nav-text">*数据挂载</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%85%81%E8%AE%B8%E8%AE%BF%E9%97%AE%E7%BD%91%E7%BB%9C"><span class="nav-number">10.5.</span> <span class="nav-text">*允许访问网络</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%8D%81%E4%B8%80%E3%80%81%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98"><span class="nav-number">11.</span> <span class="nav-text">十一、常见问题</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#https%E5%8F%82%E6%95%B0%E6%9C%AA%E8%AE%BE%E7%BD%AE-The-protocol-is-https-but-attribute-ssl-cert-is-not-set"><span class="nav-number">11.1.</span> <span class="nav-text">https参数未设置( The protocol is https but attribute ssl_cert is not set)</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%90%AF%E5%8A%A8harbor%E6%8A%A5-Failed-to-Setup-IP-tables-Unable-to-enable-SKIP-DNAT-rule%EF%BC%89"><span class="nav-number">11.2.</span> <span class="nav-text">启动harbor报( Failed to Setup IP tables: Unable to enable SKIP DNAT rule）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E8%BF%9E%E6%8E%A5%E7%A7%81%E6%9C%8D%E6%8A%A5-http-server-gave-HTTP-response-to-HTTPS-client"><span class="nav-number">11.3.</span> <span class="nav-text">连接私服报(http: server gave HTTP response to HTTPS client)</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#docker%E7%A3%81%E7%9B%98%E7%A9%BA%E9%97%B4%E4%B8%8D%E8%B6%B3%EF%BC%88ERROR%EF%BC%9Acannot-create-temporary-directory%EF%BC%89%EF%BC%88fatal-error-runtime-out-of-memory%EF%BC%89"><span class="nav-number">11.4.</span> <span class="nav-text">docker磁盘空间不足（ERROR：cannot  create temporary directory）（fatal error: runtime: out of memory）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E9%95%9C%E5%83%8F%E4%B8%8D%E5%AD%98%E5%9C%A8-No-such-image-perl-latest"><span class="nav-number">11.5.</span> <span class="nav-text">镜像不存在(No such image: perl:latest)</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E8%BF%9E%E6%8E%A5%E8%B6%85%E8%BF%87%E9%87%8D%E8%AF%95%E6%AC%A1%E6%95%B0-connection-reset-by-peer-See-%E2%80%98docker-run-%E2%80%93help%E2%80%99"><span class="nav-number">11.6.</span> <span class="nav-text">连接超过重试次数(connection reset by peer. See ‘docker run –help’.)</span></a></li></ol></li></ol>
    
    </div>
  </aside>


</section>
        
      </div>
      
      <footer id="footer">
  

  <div class="container">
      	<div class="row">
	      <!-- <p> Powered by <a href="http://hexo.io/" target="_blank">Hexo</a> and <a href="https://github.com/iTimeTraveler/hexo-theme-hiker" target="_blank">Hexo-theme-hiker</a> </p> -->
	      <p>May there be no bug in the world！</p>
        <p id="copyRightEn">Copyright &copy; 2022 - 2023 All Rights Reserved.</p>
	      
	      
    		<p class="busuanzi_uv">
				UV : <span id="busuanzi_value_site_uv"></span> |  
				PV : <span id="busuanzi_value_site_pv"></span>
		    </p>
  		   
		</div>

		
  </div>
</footer>


<!-- min height -->

<script>
    var wrapdiv = document.getElementById("wrap");
    var contentdiv = document.getElementById("content");
    var allheader = document.getElementById("allheader");

    wrapdiv.style.minHeight = document.body.offsetHeight + "px";
    if (allheader != null) {
      contentdiv.style.minHeight = document.body.offsetHeight - allheader.offsetHeight - document.getElementById("footer").offsetHeight + "px";
    } else {
      contentdiv.style.minHeight = document.body.offsetHeight - document.getElementById("footer").offsetHeight + "px";
    }
</script>
    </div>
    <!-- <nav id="mobile-nav">
  
    <a href="/qingfeng-blog/" class="mobile-nav-link">首页</a>
  
    <a href="/qingfeng-blog/categories" class="mobile-nav-link">分类</a>
  
    <a href="/qingfeng-blog/tags" class="mobile-nav-link">标签</a>
  
</nav> -->
    

<!-- mathjax config similar to math.stackexchange -->

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for(i=0; i < all.length; i += 1) {
            all[i].SourceElement().parentNode.className += ' has-jax';
        }
    });
</script>

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>


  
<link rel="stylesheet" href="/qingfeng-blog/fancybox/jquery.fancybox.css">

  
<script src="/qingfeng-blog/fancybox/jquery.fancybox.pack.js"></script>




<script src="/qingfeng-blog/js/scripts.js"></script>



  
<script src="/qingfeng-blog/js/home.js"></script>




  
<script src="/qingfeng-blog/js/dialog.js"></script>









	<div style="display: none;">
    <script src="https://s95.cnzz.com/z_stat.php?id=1260716016&web_id=1260716016" language="JavaScript"></script>
  </div>



	<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js">
	</script>






  </div>

  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h2 class="modal-title" id="myModalLabel">设置</h2>
      </div>
      <hr style="margin-top:0px; margin-bottom:0px; width:80%; border-top: 3px solid #000;">
      <hr style="margin-top:2px; margin-bottom:0px; width:80%; border-top: 1px solid #000;">


      <div class="modal-body">
          <div style="margin:6px;">
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" onclick="javascript:setFontSize();" aria-expanded="true" aria-controls="collapseOne">
              正文字号大小
            </a>
          </div>
          <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
          <div class="panel-body">
            您已调整页面字体大小
          </div>
        </div>
      


          <div style="margin:6px;">
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" onclick="javascript:setBackground();" aria-expanded="true" aria-controls="collapseTwo">
              夜间护眼模式
            </a>
        </div>
          <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
          <div class="panel-body">
            夜间模式已经开启，再次单击按钮即可关闭 
          </div>
        </div>

        <div>
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="true" aria-controls="collapseThree">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;关 于&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
        </div>
         <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
          <div class="panel-body">
            清峰小栈
          </div>
          <div class="panel-body">
            Copyright © 2023 清峰 All Rights Reserved.
          </div>
        </div>
      </div>


      <hr style="margin-top:0px; margin-bottom:0px; width:80%; border-top: 1px solid #000;">
      <hr style="margin-top:2px; margin-bottom:0px; width:80%; border-top: 3px solid #000;">
      <div class="modal-footer">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
      </div>
    </div>
  </div>
</div>
  
  <a id="rocket" href="#top" class=""></a>
  <script type="text/javascript" src="/qingfeng-blog/js/totop.js?v=1.0.0" async=""></script>
  
    <a id="menu-switch"><i class="fa fa-bars fa-lg"></i></a>
  
</body>
</html>